From 2c8321be1f6b0001912d336843a855dde3043adb Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sat, 4 Oct 2014 13:15:02 -0700 Subject: 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. --- node/Switch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'node/Switch.cpp') 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,const MAC &from,c nconf->multicastLimit(), now, network->id(), + nconf->activeBridges(), mg, from, etherType, @@ -169,6 +170,7 @@ void Switch::onLocalEthernet(const SharedPtr &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,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
::const_iterator ab(nconf->activeBridges().begin()); + std::vector
::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()) { -- cgit v1.2.3