Revert "Build fix, and move multicast pushCredentialsIfNeeded."

This reverts commit cc42d6f4e0b692eec5a8fd4d886958e59238e0f8.
This commit is contained in:
Adam Ierymenko 2020-11-12 20:53:14 -05:00
parent cc42d6f4e0
commit 1a106bca3b
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3
2 changed files with 2 additions and 9 deletions

View File

@ -247,7 +247,6 @@ void Multicaster::send(
for(unsigned int i=0;i<activeBridgeCount;++i) { for(unsigned int i=0;i<activeBridgeCount;++i) {
if ((activeBridges[i] != RR->identity.address())&&(activeBridges[i] != origin)) { if ((activeBridges[i] != RR->identity.address())&&(activeBridges[i] != origin)) {
network->pushCredentialsIfNeeded(tPtr,activeBridges[i],RR->node->now());
out.sendOnly(RR,tPtr,activeBridges[i]); // optimization: don't use dedup log if it's a one-pass send out.sendOnly(RR,tPtr,activeBridges[i]); // optimization: don't use dedup log if it's a one-pass send
if (++count >= limit) if (++count >= limit)
break; break;
@ -258,7 +257,6 @@ void Multicaster::send(
while ((count < limit)&&(idx < gs.members.size())) { while ((count < limit)&&(idx < gs.members.size())) {
const Address ma(gs.members[indexes[idx++]].address); const Address ma(gs.members[indexes[idx++]].address);
if ((std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount))&&(ma != origin)) { if ((std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount))&&(ma != origin)) {
network->pushCredentialsIfNeeded(tPtr,ma,RR->node->now());
out.sendOnly(RR,tPtr,ma); // optimization: don't use dedup log if it's a one-pass send out.sendOnly(RR,tPtr,ma); // optimization: don't use dedup log if it's a one-pass send
++count; ++count;
} }
@ -349,7 +347,6 @@ void Multicaster::send(
for(unsigned int i=0;i<activeBridgeCount;++i) { for(unsigned int i=0;i<activeBridgeCount;++i) {
if (activeBridges[i] != RR->identity.address()) { if (activeBridges[i] != RR->identity.address()) {
network->pushCredentialsIfNeeded(tPtr,activeBridges[i],RR->node->now());
out.sendAndLog(RR,tPtr,activeBridges[i]); out.sendAndLog(RR,tPtr,activeBridges[i]);
if (++count >= limit) if (++count >= limit)
break; break;
@ -360,7 +357,6 @@ void Multicaster::send(
while ((count < limit)&&(idx < gs.members.size())) { while ((count < limit)&&(idx < gs.members.size())) {
Address ma(gs.members[indexes[idx++]].address); Address ma(gs.members[indexes[idx++]].address);
if (std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount)) { if (std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount)) {
network->pushCredentialsIfNeeded(tPtr,ma,RR->node->now());
out.sendAndLog(RR,tPtr,ma); out.sendAndLog(RR,tPtr,ma);
++count; ++count;
} }
@ -418,10 +414,6 @@ void Multicaster::_add(void *tPtr,int64_t now,uint64_t nwid,const MulticastGroup
if (member == RR->identity.address()) if (member == RR->identity.address())
return; return;
SharedPtr<Network> network(RR->node->network(nwid));
if (!network)
return;
std::vector<MulticastGroupMember>::iterator m(std::lower_bound(gs.members.begin(),gs.members.end(),member)); std::vector<MulticastGroupMember>::iterator m(std::lower_bound(gs.members.begin(),gs.members.end(),member));
if (m != gs.members.end()) { if (m != gs.members.end()) {
if (m->address == member) { if (m->address == member) {
@ -437,7 +429,6 @@ void Multicaster::_add(void *tPtr,int64_t now,uint64_t nwid,const MulticastGroup
if (tx->atLimit()) if (tx->atLimit())
gs.txQueue.erase(tx++); gs.txQueue.erase(tx++);
else { else {
network->pushCredentialsIfNeeded(tPtr,member,RR->node->now());
tx->sendIfNew(RR,tPtr,member); tx->sendIfNew(RR,tPtr,member);
if (tx->atLimit()) if (tx->atLimit())
gs.txQueue.erase(tx++); gs.txQueue.erase(tx++);

View File

@ -481,6 +481,8 @@ void Switch::onLocalEthernet(void *tPtr,const SharedPtr<Network> &network,const
return; return;
} }
network->pushCredentialsIfNeeded(tPtr,toZT,RR->node->now());
RR->mc->send( RR->mc->send(
tPtr, tPtr,
RR->node->now(), RR->node->now(),