mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-12 20:28:27 +00:00
Rename getBestRoot() etc.
This commit is contained in:
@ -211,8 +211,7 @@ public:
|
||||
}
|
||||
|
||||
if (upstream) {
|
||||
// "Upstream" devices are roots and relays and get special treatment -- they stay alive
|
||||
// forever and we try to keep (if available) both IPv4 and IPv6 channels open to them.
|
||||
// We keep connections to upstream peers alive forever.
|
||||
bool needToContactIndirect = true;
|
||||
if (p->doPingAndKeepalive(_now,AF_INET)) {
|
||||
needToContactIndirect = false;
|
||||
@ -231,11 +230,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// If we don't have a direct path or a static endpoint, send something indirectly to find one.
|
||||
if (needToContactIndirect) {
|
||||
// If this is an upstream and we have no stable endpoint for either IPv4 or IPv6,
|
||||
// send a NOP indirectly if possible to see if we can get to this peer in any
|
||||
// way whatsoever. This will e.g. find network preferred relays that lack
|
||||
// stable endpoints by using root servers.
|
||||
Packet outp(p->address(),RR->identity.address(),Packet::VERB_NOP);
|
||||
RR->sw->send(outp,true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user