summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-01-12 09:49:11 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-01-12 09:49:11 -0800
commitfbc6ca28b7ee0b5d9917cdf6f7251e65dbb0d3ee (patch)
tree56787fd56d1fdafeabeb2e82e9bb3d8174f57468 /node/Node.cpp
parent72f926dc41bed699f6510a273f5ebbe30d84f755 (diff)
parenteab3ca1401b083b3d91d30d2c6f571dcb5c8a2a6 (diff)
downloadinfinitytier-fbc6ca28b7ee0b5d9917cdf6f7251e65dbb0d3ee.tar.gz
infinitytier-fbc6ca28b7ee0b5d9917cdf6f7251e65dbb0d3ee.zip
Merge branch 'adamierymenko-dev' of ssh://earth.zerotier.net:55522/git/ZeroTierOne into adamierymenko-dev
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index d65e4e39..b9f027e3 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -310,6 +310,21 @@ Node::ReasonForTermination Node::run()
}
RR->node = this;
+#ifdef ZT_ENABLE_NETCONF_MASTER
+ {
+ std::string redisHost(RR->nc->getLocalConfig(ZT_LOCAL_CONFIG_NETCONF_REDIS_HOST));
+ if (redisHost.length() > 0) {
+ unsigned int redisPort = Utils::strToUInt(RR->nc->getLocalConfig(ZT_LOCAL_CONFIG_NETCONF_REDIS_PORT).c_str());
+ if ((redisPort == 0)||(redisPort > 0xffff))
+ redisPort = ZT_LOCAL_CONFIG_NETCONF_REDIS_PORT_DEFAULT;
+ std::string redisAuth(RR->nc->getLocalConfig(ZT_LOCAL_CONFIG_NETCONF_REDIS_AUTH));
+ std::string redisDatabaseNumberStr(RR->nc->getLocalConfig(ZT_LOCAL_CONFIG_NETCONF_REDIS_DBNUM));
+ unsigned int redisDatabaseNumber = (redisDatabaseNumberStr.length() > 0) ? Utils::strToUInt(redisDatabaseNumberStr.c_str()) : (unsigned int)ZT_LOCAL_CONFIG_NETCONF_REDIS_DBNUM_DEFAULT;
+ RR->netconfMaster = new NetworkConfigMaster(RR,redisHost.c_str(),redisPort,redisAuth.c_str(),redisDatabaseNumber);
+ }
+ }
+#endif
+
#ifdef ZT_AUTO_UPDATE
if (ZT_DEFAULTS.updateLatestNfoURL.length()) {
RR->updater = new SoftwareUpdater(RR);