mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-18 20:47:53 +00:00
Fix crash when multipath is used with forceTcpRelay
This commit is contained in:
parent
1f4c00c7b5
commit
d658c1187c
@ -2445,8 +2445,13 @@ public:
|
||||
}
|
||||
|
||||
// bondingPolicy cannot be used with allowTcpFallbackRelay
|
||||
_allowTcpFallbackRelay = OSUtils::jsonBool(settings["allowTcpFallbackRelay"],true);
|
||||
_forceTcpRelay = OSUtils::jsonBool(settings["forceTcpRelay"],false);
|
||||
bool _forceTcpRelayTmp = (OSUtils::jsonBool(settings["forceTcpRelay"],false));
|
||||
bool _bondInUse = _node->bondController()->inUse();
|
||||
if (_forceTcpRelayTmp && _bondInUse) {
|
||||
fprintf(stderr, "Warning: forceTcpRelay cannot be used with multipath. Disabling forceTcpRelay\n");
|
||||
}
|
||||
_allowTcpFallbackRelay = (OSUtils::jsonBool(settings["allowTcpFallbackRelay"],true) && !_node->bondController()->inUse());
|
||||
_forceTcpRelay = (_forceTcpRelayTmp && !_node->bondController()->inUse());
|
||||
|
||||
#ifdef ZT_TCP_FALLBACK_RELAY
|
||||
_fallbackRelayAddress = InetAddress(OSUtils::jsonString(settings["tcpFallbackRelay"], ZT_TCP_FALLBACK_RELAY).c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user