mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Software update fix.
This commit is contained in:
parent
0f3148bda2
commit
d0224b3623
1 changed files with 36 additions and 34 deletions
|
@ -1148,6 +1148,7 @@ public:
|
||||||
settings["portMappingEnabled"] = false; // not supported in build
|
settings["portMappingEnabled"] = false; // not supported in build
|
||||||
#endif
|
#endif
|
||||||
settings["softwareUpdate"] = OSUtils::jsonString(settings["softwareUpdate"],ZT_SOFTWARE_UPDATE_DEFAULT);
|
settings["softwareUpdate"] = OSUtils::jsonString(settings["softwareUpdate"],ZT_SOFTWARE_UPDATE_DEFAULT);
|
||||||
|
settings["softwareUpdateChannel"] = OSUtils::jsonString(settings["softwareUpdateChannel"],ZT_SOFTWARE_UPDATE_DEFAULT_CHANNEL);
|
||||||
|
|
||||||
const World planet(_node->planet());
|
const World planet(_node->planet());
|
||||||
res["planetWorldId"] = planet.id();
|
res["planetWorldId"] = planet.id();
|
||||||
|
@ -1420,12 +1421,13 @@ public:
|
||||||
void applyLocalConfig()
|
void applyLocalConfig()
|
||||||
{
|
{
|
||||||
Mutex::Lock _l(_localConfig_m);
|
Mutex::Lock _l(_localConfig_m);
|
||||||
|
json lc(_localConfig);
|
||||||
|
|
||||||
_v4Hints.clear();
|
_v4Hints.clear();
|
||||||
_v6Hints.clear();
|
_v6Hints.clear();
|
||||||
_v4Blacklists.clear();
|
_v4Blacklists.clear();
|
||||||
_v6Blacklists.clear();
|
_v6Blacklists.clear();
|
||||||
json &virt = _localConfig["virtual"];
|
json &virt = lc["virtual"];
|
||||||
if (virt.is_object()) {
|
if (virt.is_object()) {
|
||||||
for(json::iterator v(virt.begin());v!=virt.end();++v) {
|
for(json::iterator v(virt.begin());v!=virt.end();++v) {
|
||||||
const std::string nstr = v.key();
|
const std::string nstr = v.key();
|
||||||
|
@ -1470,7 +1472,7 @@ public:
|
||||||
|
|
||||||
_globalV4Blacklist.clear();
|
_globalV4Blacklist.clear();
|
||||||
_globalV6Blacklist.clear();
|
_globalV6Blacklist.clear();
|
||||||
json &physical = _localConfig["physical"];
|
json &physical = lc["physical"];
|
||||||
if (physical.is_object()) {
|
if (physical.is_object()) {
|
||||||
for(json::iterator phy(physical.begin());phy!=physical.end();++phy) {
|
for(json::iterator phy(physical.begin());phy!=physical.end();++phy) {
|
||||||
const InetAddress net(OSUtils::jsonString(phy.key(),""));
|
const InetAddress net(OSUtils::jsonString(phy.key(),""));
|
||||||
|
@ -1489,8 +1491,9 @@ public:
|
||||||
|
|
||||||
_allowManagementFrom.clear();
|
_allowManagementFrom.clear();
|
||||||
_interfacePrefixBlacklist.clear();
|
_interfacePrefixBlacklist.clear();
|
||||||
json &settings = _localConfig["settings"];
|
|
||||||
if (settings.is_object()) {
|
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;
|
||||||
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
||||||
|
|
||||||
|
@ -1526,7 +1529,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Checks if a managed IP or route target is allowed
|
// Checks if a managed IP or route target is allowed
|
||||||
bool checkIfManagedIsAllowed(const NetworkState &n,const InetAddress &target)
|
bool checkIfManagedIsAllowed(const NetworkState &n,const InetAddress &target)
|
||||||
|
|
Loading…
Add table
Reference in a new issue