mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Minor adjustment to how _allowTcpFallbackRelay is disabled when _multipathMode is set
This commit is contained in:
parent
0634214f2c
commit
963113b86d
1 changed files with 3 additions and 6 deletions
|
@ -1572,18 +1572,15 @@ public:
|
||||||
json &settings = lc["settings"];
|
json &settings = lc["settings"];
|
||||||
|
|
||||||
_primaryPort = (unsigned int)OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff;
|
_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);
|
_allowSecondaryPort = OSUtils::jsonBool(settings["allowSecondaryPort"],true);
|
||||||
_secondaryPort = (unsigned int)OSUtils::jsonInt(settings["secondaryPort"],0);
|
_secondaryPort = (unsigned int)OSUtils::jsonInt(settings["secondaryPort"],0);
|
||||||
_tertiaryPort = (unsigned int)OSUtils::jsonInt(settings["tertiaryPort"],0);
|
_tertiaryPort = (unsigned int)OSUtils::jsonInt(settings["tertiaryPort"],0);
|
||||||
if (_secondaryPort != 0 || _tertiaryPort != 0) {
|
if (_secondaryPort != 0 || _tertiaryPort != 0) {
|
||||||
fprintf(stderr,"WARNING: using manually-specified ports. This can cause NAT issues." ZT_EOL_S);
|
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);
|
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
||||||
|
|
||||||
#ifndef ZT_SDK
|
#ifndef ZT_SDK
|
||||||
|
|
Loading…
Add table
Reference in a new issue