diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-30 17:10:34 -0400 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-30 17:10:34 -0400 |
commit | 1a764559863c823da227098701521ed29bec037e (patch) | |
tree | 1ba65a5537769347a19ceb2929a153477d70db0b | |
parent | e72a1de0d5bc11fae2d4182921a6fbe939e7f90b (diff) | |
download | infinitytier-1a764559863c823da227098701521ed29bec037e.tar.gz infinitytier-1a764559863c823da227098701521ed29bec037e.zip |
Fix for multicast propagation to prevent buildup of frames ping-ponging between supernodes.
-rw-r--r-- | node/PacketDecoder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp index 8bdddbe9..a2b827c0 100644 --- a/node/PacketDecoder.cpp +++ b/node/PacketDecoder.cpp @@ -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); |