|
|
|
|
@ -22,7 +22,7 @@ namespace ZeroTier {
|
|
|
|
|
bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,bool includeLegacy) const |
|
|
|
|
{ |
|
|
|
|
Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY> *tmp = new Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY>(); |
|
|
|
|
char tmp2[128]; |
|
|
|
|
char tmp2[128] = {0}; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
d.clear(); |
|
|
|
|
@ -84,7 +84,7 @@ bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,b
|
|
|
|
|
if (((int)lastrt < 32)||(lastrt == ZT_NETWORK_RULE_MATCH_ETHERTYPE)) { |
|
|
|
|
if (ets.length() > 0) |
|
|
|
|
ets.push_back(','); |
|
|
|
|
char tmp2[16]; |
|
|
|
|
char tmp2[16] = {0}; |
|
|
|
|
ets.append(Utils::hex((uint16_t)et,tmp2)); |
|
|
|
|
} |
|
|
|
|
et = 0; |
|
|
|
|
@ -104,7 +104,7 @@ bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,b
|
|
|
|
|
if ((this->specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_ACTIVE_BRIDGE) != 0) { |
|
|
|
|
if (ab.length() > 0) |
|
|
|
|
ab.push_back(','); |
|
|
|
|
char tmp2[16]; |
|
|
|
|
char tmp2[16] = {0}; |
|
|
|
|
ab.append(Address(this->specialists[i]).toString(tmp2)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -220,7 +220,7 @@ bool NetworkConfig::fromDictionary(const Dictionary<ZT_NETWORKCONFIG_DICT_CAPACI
|
|
|
|
|
|
|
|
|
|
if (d.getUI(ZT_NETWORKCONFIG_DICT_KEY_VERSION,0) < 6) { |
|
|
|
|
#ifdef ZT_SUPPORT_OLD_STYLE_NETCONF |
|
|
|
|
char tmp2[1024]; |
|
|
|
|
char tmp2[1024] = {0}; |
|
|
|
|
|
|
|
|
|
// Decode legacy fields if version is old
|
|
|
|
|
if (d.getB(ZT_NETWORKCONFIG_DICT_KEY_ENABLE_BROADCAST_OLD)) |
|
|
|
|
|