mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Forgot to set defaults if multicast parameters are unset.
This commit is contained in:
parent
fb7d9b1029
commit
e13d4df9ab
3 changed files with 7 additions and 2 deletions
|
@ -432,7 +432,7 @@ int main(int argc,char **argv)
|
||||||
sprintf(buf,"%x",arpCacheTtl);
|
sprintf(buf,"%x",arpCacheTtl);
|
||||||
netconf[ZT_NETWORKCONFIG_DICT_KEY_ARP_CACHE_TTL] = buf;
|
netconf[ZT_NETWORKCONFIG_DICT_KEY_ARP_CACHE_TTL] = buf;
|
||||||
}
|
}
|
||||||
if (ndpCachettl) {
|
if (ndpCacheTtl) {
|
||||||
sprintf(buf,"%x",ndpCacheTtl);
|
sprintf(buf,"%x",ndpCacheTtl);
|
||||||
netconf[ZT_NETWORKCONFIG_DICT_KEY_NDP_CACHE_TTL] = buf;
|
netconf[ZT_NETWORKCONFIG_DICT_KEY_NDP_CACHE_TTL] = buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ error_no_ZT_ARCH_defined;
|
||||||
/**
|
/**
|
||||||
* Default max depth (TTL) for multicast propagation
|
* 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
|
* Global maximum for multicast propagation depth
|
||||||
|
|
|
@ -92,6 +92,11 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
|
||||||
_name = d.get(ZT_NETWORKCONFIG_DICT_KEY_NAME);
|
_name = d.get(ZT_NETWORKCONFIG_DICT_KEY_NAME);
|
||||||
_description = d.get(ZT_NETWORKCONFIG_DICT_KEY_DESC,std::string());
|
_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 ipAddrs(d.get(ZT_NETWORKCONFIG_DICT_KEY_IPV4_STATIC,std::string()));
|
||||||
std::string v6s(d.get(ZT_NETWORKCONFIG_DICT_KEY_IPV6_STATIC,std::string()));
|
std::string v6s(d.get(ZT_NETWORKCONFIG_DICT_KEY_IPV6_STATIC,std::string()));
|
||||||
if (v6s.length()) {
|
if (v6s.length()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue