summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node/Network.cpp6
-rw-r--r--node/NetworkConfig.hpp1
-rw-r--r--service/ControlPlane.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/node/Network.cpp b/node/Network.cpp
index 26650ca4..2a071f6f 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -96,8 +96,6 @@ Network::Network(const RuntimeEnvironment *renv,uint64_t nwid) :
} catch ( ... ) {} // ignore invalid MCDB, we'll re-learn from peers
}
- requestConfiguration();
-
ZT1_VirtualNetworkConfig ctmp;
_externalConfig(&ctmp);
_portError = RR->node->configureVirtualNetworkPort(_id,ZT1_VIRTUAL_NETWORK_CONFIG_OPERATION_UP,&ctmp);
@@ -468,7 +466,7 @@ void Network::_externalConfig(ZT1_VirtualNetworkConfig *ec) const
{
// assumes _lock is locked
ec->nwid = _id;
- ec->mac = MAC(RR->identity.address(),_id);
+ ec->mac = _mac.toInt();
if (_config)
Utils::scopy(ec->name,sizeof(ec->name),_config->name().c_str());
else ec->name[0] = (char)0;
@@ -481,7 +479,7 @@ void Network::_externalConfig(ZT1_VirtualNetworkConfig *ec) const
ec->portError = _portError;
ec->netconfRevision = (_config) ? (unsigned long)_config->revision() : 0;
- ec->multicastSubscriptionCount = std::max((unsigned int)_myMulticastGroups.size(),(unsigned int)ZT1_MAX_NETWORK_MULTICAST_SUBSCRIPTIONS);
+ ec->multicastSubscriptionCount = std::min((unsigned int)_myMulticastGroups.size(),(unsigned int)ZT1_MAX_NETWORK_MULTICAST_SUBSCRIPTIONS);
for(unsigned int i=0;i<ec->multicastSubscriptionCount;++i) {
ec->multicastSubscriptions[i].mac = _myMulticastGroups[i].mac().toInt();
ec->multicastSubscriptions[i].adi = _myMulticastGroups[i].adi();
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp
index 0aa7a70d..31e47f41 100644
--- a/node/NetworkConfig.hpp
+++ b/node/NetworkConfig.hpp
@@ -65,6 +65,7 @@ namespace ZeroTier {
#define ZT_NETWORKCONFIG_DICT_KEY_ENABLE_BROADCAST "eb"
#define ZT_NETWORKCONFIG_DICT_KEY_ALLOW_PASSIVE_BRIDGING "pb"
#define ZT_NETWORKCONFIG_DICT_KEY_ACTIVE_BRIDGES "ab"
+#define ZT_NETWORKCONFIG_DICT_KEY_RELAYS "rl"
/**
* Network configuration received from netconf master nodes
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp
index 5077dce9..01e31fbf 100644
--- a/service/ControlPlane.cpp
+++ b/service/ControlPlane.cpp
@@ -135,7 +135,7 @@ static void _jsonAppend(std::string &buf,const ZT1_VirtualNetworkConfig *nc)
"{"
"\"nwid\": \"%.16llx\","
"\"mac\": \"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\","
- "\"name\": %s,"
+ "\"name\": \"%s\","
"\"status\": \"%s\","
"\"type\": \"%s\","
"\"mtu\": %u,"