From 03dc823ad7732fde2ccfa30446778fa229d69760 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 10 Oct 2014 12:55:06 -0700 Subject: [PATCH] (1) Back off a little on default max multicast limit since 128 is pretty bandwidth heavy, (2) add a little to default multicast rate limit since new MC algo is fairerererer, (3) decided not to involve netconf masters in multicast so take that out of list of who gets LIKEs. --- node/Constants.hpp | 2 +- node/Network.cpp | 2 +- node/NetworkConfig.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/node/Constants.hpp b/node/Constants.hpp index cae9fb0d8..7fd7be359 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -258,7 +258,7 @@ /** * Default maximum number of peers to address with a single multicast (if unspecified in network) */ -#define ZT_MULTICAST_DEFAULT_LIMIT 128 +#define ZT_MULTICAST_DEFAULT_LIMIT 64 /** * Delay between scans of the topology active peer DB for peers that need ping diff --git a/node/Network.cpp b/node/Network.cpp index b9295c9b4..216a83312 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -123,7 +123,7 @@ public: inline void operator()(Topology &t,const SharedPtr &p) { - if ( ( (p->hasActiveDirectPath(_now)) && (_network->isAllowed(p->address())) ) || (_network->controller() == p->address()) || (t.isSupernode(p->address())) ) { + if ( ( (p->hasActiveDirectPath(_now)) && (_network->isAllowed(p->address())) ) || (t.isSupernode(p->address())) ) { Packet outp(p->address(),RR->identity.address(),Packet::VERB_MULTICAST_LIKE); std::set mgs(_network->multicastGroups()); diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp index 124171a77..b3e2c178c 100644 --- a/node/NetworkConfig.cpp +++ b/node/NetworkConfig.cpp @@ -33,9 +33,8 @@ namespace ZeroTier { // This is fast enough for things like Apple's mDNS spam, so it should serve -// as a good default for your average network. It's 64 bytes per second, with -// a starting and max balance of 64k. -const NetworkConfig::MulticastRate NetworkConfig::DEFAULT_MULTICAST_RATE(32768,32768,64); +// as a good default for your average network. +const NetworkConfig::MulticastRate NetworkConfig::DEFAULT_MULTICAST_RATE(40000,60000,80); SharedPtr NetworkConfig::createTestNetworkConfig(const Address &self) {