mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-07 11:17:29 +00:00
Fix for multicast propagation to prevent buildup of frames ping-ponging between supernodes.
This commit is contained in:
parent
e72a1de0d5
commit
1a76455986
@ -576,7 +576,7 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
|
||||
|
||||
// First element in newFifo[] is next hop
|
||||
Address nextHop(newFifo,ZT_ADDRESS_LENGTH);
|
||||
if (!nextHop) {
|
||||
if ((!nextHop)&&(!_r->topology->amSupernode())) {
|
||||
SharedPtr<Peer> supernode(_r->topology->getBestSupernode(&origin,1,true));
|
||||
if (supernode)
|
||||
nextHop = supernode->address();
|
||||
@ -589,6 +589,8 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
|
||||
// The rest of newFifo[] goes back into the packet
|
||||
memcpy(fifo,newFifo + ZT_ADDRESS_LENGTH,ZT_PROTO_VERB_MULTICAST_FRAME_LEN_PROPAGATION_FIFO);
|
||||
|
||||
//TRACE("forwarding MULTICAST_FRAME from %s(%s) to %s, original sender %s, current depth: %u",source().toString().c_str(),_remoteAddress.toString().c_str(),nextHop.toString().c_str(),origin.toString().c_str(),depth);
|
||||
|
||||
// Send to next hop, reusing this packet as scratch space
|
||||
newInitializationVector();
|
||||
setDestination(nextHop);
|
||||
|
Loading…
x
Reference in New Issue
Block a user