diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-04 13:15:02 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-04 13:15:02 -0700 |
| commit | 2c8321be1f6b0001912d336843a855dde3043adb (patch) | |
| tree | 0501ce3e76ca481cfe305a05c028850f2880d1f2 /node/Switch.cpp | |
| parent | 62da7e67b64712fc5cfce771ff944057abff705b (diff) | |
| download | infinitytier-2c8321be1f6b0001912d336843a855dde3043adb.tar.gz infinitytier-2c8321be1f6b0001912d336843a855dde3043adb.zip | |
Pull logic to always send new multicasts to supernode since we need to do that differently, re-add support for active bridges, and remove some gratuitous use of std::set where not needed.
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index de245442..4ad55056 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -155,6 +155,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c nconf->multicastLimit(), now, network->id(), + nconf->activeBridges(), mg, from, etherType, @@ -169,6 +170,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c Address toZT(to.toAddress(network->id())); if (network->isAllowed(toZT)) { + // TODO: we can refactor this to push certificates with EXT_FRAME network->pushMembershipCertificate(toZT,false,Utils::now()); if (fromBridged) { @@ -214,7 +216,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c * know which port corresponds to a MAC, they send it to all ports. If * there aren't any active bridges, numBridges will stay 0 and packet * is dropped. */ - std::set<Address>::const_iterator ab(nconf->activeBridges().begin()); + std::vector<Address>::const_iterator ab(nconf->activeBridges().begin()); if (nconf->activeBridges().size() <= ZT_MAX_BRIDGE_SPAM) { // If there are <= ZT_MAX_BRIDGE_SPAM active bridges, spam them all while (ab != nconf->activeBridges().end()) { |
