diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index 3a7d22306..8bd1d62e8 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -1654,7 +1654,7 @@ void EmbeddedNetworkController::_request( DB::cleanMember(member); _db.save(member,true); - _sender->ncSendConfig(nwid,requestPacketId,identity.address(),*(nc.get()),metaData.getUI(ZT_NETWORKCONFIG_REQUEST_METADATA_KEY_VERSION,0) < 6); + _sender->ncSendConfig(nwid,requestPacketId,identity.address(),*(nc.get()),false); } void EmbeddedNetworkController::_startThreads() diff --git a/node/AES.hpp b/node/AES.hpp index 4792cc8aa..cab5afcb6 100644 --- a/node/AES.hpp +++ b/node/AES.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #define ZT_AES_AESNI 1 #endif diff --git a/node/Hashtable.hpp b/node/Hashtable.hpp index a5f6b0f6d..833edb48b 100644 --- a/node/Hashtable.hpp +++ b/node/Hashtable.hpp @@ -16,6 +16,8 @@ #include "Constants.hpp" +#include + namespace ZeroTier { /** @@ -68,8 +70,8 @@ public: { for(;;) { if (_b) { - kptr = &(_b->k); - vptr = &(_b->v); + kptr = (K *)(&(_b->k)); + vptr = (V *)(&(_b->v)); _b = _b->next; return true; } diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index 21f98a3b1..e5d09cf58 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -46,7 +46,7 @@ unsigned int Multicaster::send( std::vector< std::pair > recipients; const NetworkConfig &config = network->config(); - if (config.multicastLimit == 0) return; // multicast disabled + if (config.multicastLimit == 0) return 0; // multicast disabled Address specialists[ZT_MAX_NETWORK_SPECIALISTS],multicastReplicators[ZT_MAX_NETWORK_SPECIALISTS]; unsigned int specialistCount = 0,multicastReplicatorCount = 0,bridgeCount = 0; diff --git a/node/Multicaster.hpp b/node/Multicaster.hpp index e801fe9cd..594608abb 100644 --- a/node/Multicaster.hpp +++ b/node/Multicaster.hpp @@ -178,7 +178,7 @@ public: } } std::sort(sortedByTime.begin(),sortedByTime.end()); - for(std::vector< std::pair >::const_reverse_iterator i(sortedByTime.begin());i!=sortedByTime.end();++i) { + for(std::vector< std::pair >::const_reverse_iterator i(sortedByTime.rbegin());i!=sortedByTime.rend();++i) { if (!func(i->second)) break; } diff --git a/node/Network.hpp b/node/Network.hpp index e98d9393f..bfc6b2c99 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -404,8 +404,8 @@ public: { Mutex::Lock ml(_memberships_l); Hashtable::Iterator i(_memberships); - const Address *a = nullptr; - const Membership *m = nullptr; + Address *a = nullptr; + Membership *m = nullptr; while (i.next(a,m)) { if (!f(*a,*m)) break; diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp index 9828d5890..74bed6fd2 100644 --- a/node/NetworkConfig.hpp +++ b/node/NetworkConfig.hpp @@ -293,7 +293,7 @@ struct NetworkConfig return false; } - ZT_ALWAYS_INLINE Capability *capability(const uint32_t id) const + ZT_ALWAYS_INLINE const Capability *capability(const uint32_t id) const { for(unsigned int i=0;i #include +#include #include "../node/Constants.hpp" #include "../node/Hashtable.hpp" diff --git a/osdep/NeighborDiscovery.hpp b/osdep/NeighborDiscovery.hpp index 5abf3129b..5d1a07b1b 100644 --- a/osdep/NeighborDiscovery.hpp +++ b/osdep/NeighborDiscovery.hpp @@ -18,14 +18,10 @@ #include "../node/MAC.hpp" #include "../node/InetAddress.hpp" - #define ZT_ND_QUERY_INTERVAL 2000 - #define ZT_ND_QUERY_MAX_TTL 5000 - #define ZT_ND_EXPIRE 600000 - namespace ZeroTier { class NeighborDiscovery