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.
This commit is contained in:
parent
62da7e67b6
commit
2c8321be1f
6 changed files with 64 additions and 61 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue