summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-14 15:16:04 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-14 15:16:04 -0700
commit49d31613b91cf578d289086c28ea88c202c617d2 (patch)
tree3a0558f0c697d6658f364df2a1fa3a780364096d /node
parent758b5caf945bad08d59a5832aeecff7af504d5de (diff)
downloadinfinitytier-49d31613b91cf578d289086c28ea88c202c617d2.tar.gz
infinitytier-49d31613b91cf578d289086c28ea88c202c617d2.zip
Fix some minor issues, now to reintegrate taps.
Diffstat (limited to 'node')
-rw-r--r--node/Network.cpp6
-rw-r--r--node/NetworkConfig.hpp1
2 files changed, 3 insertions, 4 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