summaryrefslogtreecommitdiff
path: root/node/NetworkConfig.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-24 09:01:58 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-24 09:01:58 -0700
commit9180a309862f1d2abb946381b5b92a823913d425 (patch)
tree1846da0b6d9656ff89d5c54707a44369453f0931 /node/NetworkConfig.cpp
parent61d0f27d2aa5700bd39e91cec84b8c1ba04c08a5 (diff)
downloadinfinitytier-9180a309862f1d2abb946381b5b92a823913d425.tar.gz
infinitytier-9180a309862f1d2abb946381b5b92a823913d425.zip
.
Diffstat (limited to 'node/NetworkConfig.cpp')
-rw-r--r--node/NetworkConfig.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp
index c78dd995..8b85cd87 100644
--- a/node/NetworkConfig.cpp
+++ b/node/NetworkConfig.cpp
@@ -85,18 +85,16 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
_timestamp = Utils::hexStrToU64(d.get(ZT_NETWORKCONFIG_DICT_KEY_TIMESTAMP).c_str());
_issuedTo = Address(d.get(ZT_NETWORKCONFIG_DICT_KEY_ISSUED_TO));
- _multicastPrefixBits = Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_PREFIX_BITS,zero).c_str());
- if (!_multicastPrefixBits)
- _multicastPrefixBits = ZT_DEFAULT_MULTICAST_PREFIX_BITS;
- _multicastDepth = Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_DEPTH,zero).c_str());
- if (!_multicastDepth)
- _multicastDepth = ZT_DEFAULT_MULTICAST_DEPTH;
+ _multicastLimit = Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_LIMIT,zero).c_str());
+ if (_multicastLimit == 0) _multicastLimit = ZT_DEFAULT_MULTICAST_LIMIT;
_allowPassiveBridging = (Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_ALLOW_PASSIVE_BRIDGING,zero).c_str()) != 0);
_private = (Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_PRIVATE,one).c_str()) != 0);
_enableBroadcast = (Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_ENABLE_BROADCAST,one).c_str()) != 0);
_name = d.get(ZT_NETWORKCONFIG_DICT_KEY_NAME);
_description = d.get(ZT_NETWORKCONFIG_DICT_KEY_DESC,std::string());
+ // In dictionary IPs are split into V4 and V6 addresses, but we don't really
+ // need that so merge them here.
std::string ipAddrs(d.get(ZT_NETWORKCONFIG_DICT_KEY_IPV4_STATIC,std::string()));
{
std::string v6s(d.get(ZT_NETWORKCONFIG_DICT_KEY_IPV6_STATIC,std::string()));