mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
.
This commit is contained in:
parent
c9e6e60c09
commit
a42d714a87
1 changed files with 1 additions and 8 deletions
|
@ -83,10 +83,10 @@ void Peer::received(
|
||||||
Packet::Verb inReVerb)
|
Packet::Verb inReVerb)
|
||||||
{
|
{
|
||||||
#ifdef ZT_ENABLE_CLUSTER
|
#ifdef ZT_ENABLE_CLUSTER
|
||||||
InetAddress redirectTo;
|
|
||||||
if ((RR->cluster)&&(hops == 0)) {
|
if ((RR->cluster)&&(hops == 0)) {
|
||||||
// Note: findBetterEndpoint() is first since we still want to check
|
// Note: findBetterEndpoint() is first since we still want to check
|
||||||
// for a better endpoint even if we don't actually send a redirect.
|
// 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 ( (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) {
|
if (_vProto >= 5) {
|
||||||
// For newer peers we can send a more idiomatic verb: PUSH_DIRECT_PATHS.
|
// 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)
|
else if (verb == Packet::VERB_MULTICAST_FRAME)
|
||||||
_lastMulticastFrame = now;
|
_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)) {
|
if ((now - _lastAnnouncedTo) >= ((ZT_MULTICAST_LIKE_EXPIRE / 2) - 1000)) {
|
||||||
_lastAnnouncedTo = now;
|
_lastAnnouncedTo = now;
|
||||||
needMulticastGroupAnnounce = true;
|
needMulticastGroupAnnounce = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue