mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Fix for multicast propagation to prevent buildup of frames ping-ponging between supernodes.
This commit is contained in:
parent
e72a1de0d5
commit
1a76455986
1 changed files with 3 additions and 1 deletions
|
@ -576,7 +576,7 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
|
||||||
|
|
||||||
// First element in newFifo[] is next hop
|
// First element in newFifo[] is next hop
|
||||||
Address nextHop(newFifo,ZT_ADDRESS_LENGTH);
|
Address nextHop(newFifo,ZT_ADDRESS_LENGTH);
|
||||||
if (!nextHop) {
|
if ((!nextHop)&&(!_r->topology->amSupernode())) {
|
||||||
SharedPtr<Peer> supernode(_r->topology->getBestSupernode(&origin,1,true));
|
SharedPtr<Peer> supernode(_r->topology->getBestSupernode(&origin,1,true));
|
||||||
if (supernode)
|
if (supernode)
|
||||||
nextHop = supernode->address();
|
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
|
// The rest of newFifo[] goes back into the packet
|
||||||
memcpy(fifo,newFifo + ZT_ADDRESS_LENGTH,ZT_PROTO_VERB_MULTICAST_FRAME_LEN_PROPAGATION_FIFO);
|
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
|
// Send to next hop, reusing this packet as scratch space
|
||||||
newInitializationVector();
|
newInitializationVector();
|
||||||
setDestination(nextHop);
|
setDestination(nextHop);
|
||||||
|
|
Loading…
Add table
Reference in a new issue