summaryrefslogtreecommitdiff
path: root/node/NetworkConfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/NetworkConfig.cpp')
-rw-r--r--node/NetworkConfig.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp
index d4721a32..98a44557 100644
--- a/node/NetworkConfig.cpp
+++ b/node/NetworkConfig.cpp
@@ -86,6 +86,7 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
_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());
_multicastDepth = Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_DEPTH,zero).c_str());
+ _bridgingMode = (BridgingMode)Utils::hexStrToUInt(d.get(ZT_NETWORKCONFIG_DICT_KEY_BRIDGING_MODE,zero).c_str());
_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);
@@ -121,6 +122,15 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
_staticIps.insert(addr);
}
+ std::vector<std::string> ab(Utils::split(d.get(ZT_NETWORKCONFIG_DICT_KEY_ACTIVE_BRIDGES,"").c_str(),",","",""));
+ for(std::vector<std::string>::const_iterator a(ab.begin());a!=ab.end();++a) {
+ if (a->length() == ZT_ADDRESS_LENGTH_HEX) {
+ Address tmp(*a);
+ if (!tmp.isReserved())
+ _activeBridges.insert(tmp);
+ }
+ }
+
Dictionary mr(d.get(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_RATES,std::string()));
for(Dictionary::const_iterator i(mr.begin());i!=mr.end();++i) {
std::vector<std::string> params(Utils::split(i->second.c_str(),",","",""));