mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 10:46:33 +00:00
Minor adjustment to how _allowTcpFallbackRelay is disabled when _multipathMode is set
This commit is contained in:
parent
0634214f2c
commit
963113b86d
@ -1572,18 +1572,15 @@ public:
|
||||
json &settings = lc["settings"];
|
||||
|
||||
_primaryPort = (unsigned int)OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff;
|
||||
_allowTcpFallbackRelay = OSUtils::jsonBool(settings["allowTcpFallbackRelay"],true);
|
||||
_multipathMode = (unsigned int)OSUtils::jsonInt(settings["multipathMode"],0);
|
||||
// multipathMode cannot be used with allowTcpFallbackRelay
|
||||
_allowTcpFallbackRelay = OSUtils::jsonBool(settings["allowTcpFallbackRelay"],true) && !_multipathMode;
|
||||
_allowSecondaryPort = OSUtils::jsonBool(settings["allowSecondaryPort"],true);
|
||||
_secondaryPort = (unsigned int)OSUtils::jsonInt(settings["secondaryPort"],0);
|
||||
_tertiaryPort = (unsigned int)OSUtils::jsonInt(settings["tertiaryPort"],0);
|
||||
if (_secondaryPort != 0 || _tertiaryPort != 0) {
|
||||
fprintf(stderr,"WARNING: using manually-specified ports. This can cause NAT issues." ZT_EOL_S);
|
||||
}
|
||||
_multipathMode = (unsigned int)OSUtils::jsonInt(settings["multipathMode"],0);
|
||||
if (_multipathMode != 0 && _allowTcpFallbackRelay) {
|
||||
fprintf(stderr,"WARNING: multipathMode cannot be used with allowTcpFallbackRelay. Disabling allowTcpFallbackRelay" ZT_EOL_S);
|
||||
_allowTcpFallbackRelay = false;
|
||||
}
|
||||
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
||||
|
||||
#ifndef ZT_SDK
|
||||
|
Loading…
Reference in New Issue
Block a user