summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-18 15:50:31 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-18 15:50:31 -0400
commite13d4df9ab956f6c30c854c94a5e90a55903abb3 (patch)
tree98bdc659bffc49432aa026f6c1c0e5a8894bbc27 /node
parentfb7d9b10292b2747ba1cb04ded4291cac49dfd6b (diff)
downloadinfinitytier-e13d4df9ab956f6c30c854c94a5e90a55903abb3.tar.gz
infinitytier-e13d4df9ab956f6c30c854c94a5e90a55903abb3.zip
Forgot to set defaults if multicast parameters are unset.
Diffstat (limited to 'node')
-rw-r--r--node/Constants.hpp2
-rw-r--r--node/NetworkConfig.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp
index 29fab0e3..5b6fa92b 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -248,7 +248,7 @@ error_no_ZT_ARCH_defined;
/**
* Default max depth (TTL) for multicast propagation
*/
-#define ZT_DEFAULT_MULTICAST_DEPTH 64
+#define ZT_DEFAULT_MULTICAST_DEPTH 32
/**
* Global maximum for multicast propagation depth
diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp
index 6a782800..977b9aa3 100644
--- a/node/NetworkConfig.cpp
+++ b/node/NetworkConfig.cpp
@@ -92,6 +92,11 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
_name = d.get(ZT_NETWORKCONFIG_DICT_KEY_NAME);
_description = d.get(ZT_NETWORKCONFIG_DICT_KEY_DESC,std::string());
+ if (!_multicastPrefixBits)
+ _multicastPrefixBits = ZT_DEFAULT_MULTICAST_PREFIX_BITS;
+ if (!_multicastDepth)
+ _multicastDepth = ZT_DEFAULT_MULTICAST_DEPTH;
+
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()));
if (v6s.length()) {