mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-07 19:24:13 +00:00
.
This commit is contained in:
parent
c9e6e60c09
commit
a42d714a87
@ -83,10 +83,10 @@ void Peer::received(
|
||||
Packet::Verb inReVerb)
|
||||
{
|
||||
#ifdef ZT_ENABLE_CLUSTER
|
||||
InetAddress redirectTo;
|
||||
if ((RR->cluster)&&(hops == 0)) {
|
||||
// Note: findBetterEndpoint() is first since we still want to check
|
||||
// for a better endpoint even if we don't actually send a redirect.
|
||||
InetAddress redirectTo;
|
||||
if ( (RR->cluster->findBetterEndpoint(redirectTo,_id.address(),remoteAddr,false)) && (verb != Packet::VERB_OK)&&(verb != Packet::VERB_ERROR)&&(verb != Packet::VERB_RENDEZVOUS)&&(verb != Packet::VERB_PUSH_DIRECT_PATHS) ) {
|
||||
if (_vProto >= 5) {
|
||||
// For newer peers we can send a more idiomatic verb: PUSH_DIRECT_PATHS.
|
||||
@ -141,13 +141,6 @@ void Peer::received(
|
||||
else if (verb == Packet::VERB_MULTICAST_FRAME)
|
||||
_lastMulticastFrame = now;
|
||||
|
||||
#ifdef ZT_ENABLE_CLUSTER
|
||||
// If we think this peer belongs elsewhere, don't learn this path or
|
||||
// do other connection init stuff.
|
||||
if (redirectTo)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if ((now - _lastAnnouncedTo) >= ((ZT_MULTICAST_LIKE_EXPIRE / 2) - 1000)) {
|
||||
_lastAnnouncedTo = now;
|
||||
needMulticastGroupAnnounce = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user