summaryrefslogtreecommitdiff
path: root/node/Switch.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-17 16:11:57 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-17 16:11:57 -0400
commitf9079a110ee8336a8403efe466e2a75620c95ab1 (patch)
tree887584d8d1f538f517e1564479697745a1237d90 /node/Switch.cpp
parent4c06fcfc9dd0ba25ec2c50ce03f10f1d93f168f5 (diff)
downloadinfinitytier-f9079a110ee8336a8403efe466e2a75620c95ab1.tar.gz
infinitytier-f9079a110ee8336a8403efe466e2a75620c95ab1.zip
Make network multicast breadth/depth parameters configurable on a per-net basis.
Diffstat (limited to 'node/Switch.cpp')
-rw-r--r--node/Switch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp
index 0deece56..1677c145 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -119,7 +119,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c
}
Multicaster::MulticastBloomFilter bloom;
- SharedPtr<Peer> propPeers[ZT_MULTICAST_PROPAGATION_BREADTH];
+ SharedPtr<Peer> propPeers[16];
unsigned int np = _r->multicaster->pickSocialPropagationPeers(
*(_r->prng),
*(_r->topology),
@@ -128,7 +128,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c
_r->identity.address(),
Address(),
bloom,
- ZT_MULTICAST_PROPAGATION_BREADTH,
+ std::min(network->multicastPropagationBreadth(),(unsigned int)16), // 16 is a sanity check
propPeers,
now);