mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-01 23:10:52 +00:00
Fix bug in next hop selection.
This commit is contained in:
parent
20832a0562
commit
e72a1de0d5
@ -576,8 +576,11 @@ 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) {
|
||||||
nextHop = _r->topology->getBestSupernode(&origin,1,true); // exclude origin in case it's itself a supernode
|
SharedPtr<Peer> supernode(_r->topology->getBestSupernode(&origin,1,true));
|
||||||
|
if (supernode)
|
||||||
|
nextHop = supernode->address();
|
||||||
|
}
|
||||||
if ((!nextHop)||(nextHop == _r->identity.address())) { // check against our addr is a sanity check
|
if ((!nextHop)||(nextHop == _r->identity.address())) { // check against our addr is a sanity check
|
||||||
TRACE("not forwarding MULTICAST_FRAME from %s(%s): no next hop",source().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("not forwarding MULTICAST_FRAME from %s(%s): no next hop",source().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user