diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-24 16:16:00 -0500 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-24 16:16:00 -0500 |
commit | 6c64f1816d116c57a44c5b208ef4d2f751e0f309 (patch) | |
tree | 13d7b512c2c44f5455b80435c6b3f7e238e510e6 /node | |
parent | 34e2ad0dfc3207252cd27c865a4eff0d6b8388b0 (diff) | |
download | infinitytier-6c64f1816d116c57a44c5b208ef4d2f751e0f309.tar.gz infinitytier-6c64f1816d116c57a44c5b208ef4d2f751e0f309.zip |
cleanup
Diffstat (limited to 'node')
-rw-r--r-- | node/NetworkConfig.hpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp index b6764107..576db676 100644 --- a/node/NetworkConfig.hpp +++ b/node/NetworkConfig.hpp @@ -227,21 +227,9 @@ namespace ZeroTier { class NetworkConfig { public: - NetworkConfig() - { - memset(this,0,sizeof(NetworkConfig)); - } - - NetworkConfig(const NetworkConfig &nc) - { - ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); - } - - inline NetworkConfig &operator=(const NetworkConfig &nc) - { - ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); - return *this; - } + NetworkConfig() { memset(this,0,sizeof(NetworkConfig)); } + NetworkConfig(const NetworkConfig &nc) { ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); } + inline NetworkConfig &operator=(const NetworkConfig &nc) { ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); return *this; } /** * Write this network config to a dictionary for transport @@ -317,13 +305,13 @@ public: } /** - * @return ZeroTier addresses of "anchor" devices on this network + * @return ZeroTier addresses of anchors that are also multicast replicators */ inline std::vector<Address> multicastReplicators() const { std::vector<Address> r; for(unsigned int i=0;i<specialistCount;++i) { - if ((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR) != 0) + if (((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR) != 0)&&((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR) != 0)) r.push_back(Address(specialists[i])); } return r; |