mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 16:35:26 +00:00
Bridging (GitHub issue #68) does indeed work! Just needed to fix a packet size thinko.
This commit is contained in:
parent
6e485833ef
commit
aead1050fb
@ -496,7 +496,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
VERB_RENDEZVOUS = 5,
|
VERB_RENDEZVOUS = 5,
|
||||||
|
|
||||||
/* A ZT-to-ZT unicast ethernet frame:
|
/* A ZT-to-ZT unicast ethernet frame (shortened EXT_FRAME):
|
||||||
* <[8] 64-bit network ID>
|
* <[8] 64-bit network ID>
|
||||||
* <[2] 16-bit ethertype>
|
* <[2] 16-bit ethertype>
|
||||||
* <[...] ethernet payload>
|
* <[...] ethernet payload>
|
||||||
|
@ -259,10 +259,8 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c
|
|||||||
|
|
||||||
bridges[0] = network->findBridgeTo(to);
|
bridges[0] = network->findBridgeTo(to);
|
||||||
if ((bridges[0])&&(bridges[0] != _r->identity.address())&&(network->isAllowed(bridges[0]))&&(network->permitsBridging(bridges[0]))) {
|
if ((bridges[0])&&(bridges[0] != _r->identity.address())&&(network->isAllowed(bridges[0]))&&(network->permitsBridging(bridges[0]))) {
|
||||||
printf("got known bridge for %s at %s\n",to.toString().c_str(),bridges[0].toString().c_str());
|
|
||||||
++numBridges;
|
++numBridges;
|
||||||
} else if (!nconf->activeBridges().empty()) {
|
} else if (!nconf->activeBridges().empty()) {
|
||||||
printf("bridge spamming for %s\n",to.toString().c_str());
|
|
||||||
// If there is no known route, spam to up to ZT_MAX_BRIDGE_SPAM active bridges
|
// If there is no known route, spam to up to ZT_MAX_BRIDGE_SPAM active bridges
|
||||||
std::set<Address>::const_iterator ab(nconf->activeBridges().begin());
|
std::set<Address>::const_iterator ab(nconf->activeBridges().begin());
|
||||||
if (nconf->activeBridges().size() <= ZT_MAX_BRIDGE_SPAM) {
|
if (nconf->activeBridges().size() <= ZT_MAX_BRIDGE_SPAM) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user