mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-30 17:56:57 +00:00
Check for (local multipath support only) during decision to decrease direct path push interval. This prevents the chicken-and-egg situation of not knowing if two peers can support multipath on both ends and thusly not sending eachother their direct paths quickly enough.
This commit is contained in:
parent
2e9fa7a811
commit
36d368cb78
@ -553,7 +553,7 @@
|
||||
* peers of this peer's new link/address as soon as possible so that both peers can
|
||||
* begin forming an aggregated link.
|
||||
*/
|
||||
#define ZT_DIRECT_PATH_PUSH_INTERVAL_MULTIPATH ZT_DIRECT_PATH_PUSH_INTERVAL_HAVEPATH / 16
|
||||
#define ZT_DIRECT_PATH_PUSH_INTERVAL_MULTIPATH (ZT_DIRECT_PATH_PUSH_INTERVAL_HAVEPATH / 16)
|
||||
|
||||
/**
|
||||
* Time horizon for push direct paths cutoff
|
||||
|
@ -211,7 +211,7 @@ void Peer::received(
|
||||
if (this->trustEstablished(now)) {
|
||||
const int64_t sinceLastPush = now - _lastDirectPathPushSent;
|
||||
if (sinceLastPush >= ((hops == 0) ? ZT_DIRECT_PATH_PUSH_INTERVAL_HAVEPATH : ZT_DIRECT_PATH_PUSH_INTERVAL)
|
||||
|| (_canUseMultipath && (sinceLastPush >= (ZT_DIRECT_PATH_PUSH_INTERVAL_MULTIPATH)))) {
|
||||
|| (_localMultipathSupported && (sinceLastPush >= (ZT_DIRECT_PATH_PUSH_INTERVAL_MULTIPATH)))) {
|
||||
_lastDirectPathPushSent = now;
|
||||
std::vector<InetAddress> pathsToPush(RR->node->directPaths());
|
||||
if (pathsToPush.size() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user