summaryrefslogtreecommitdiff
path: root/node/PacketDecoder.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/PacketDecoder.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/PacketDecoder.cpp')
-rw-r--r--node/PacketDecoder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp
index b9eb5684..ca7af0bf 100644
--- a/node/PacketDecoder.cpp
+++ b/node/PacketDecoder.cpp
@@ -538,14 +538,14 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
_r->multicaster->addToDedupHistory(mccrc,now);
}
- if (++hops >= ZT_MULTICAST_PROPAGATION_DEPTH) {
+ if (++hops >= network->multicastPropagationDepth()) {
TRACE("not propagating MULTICAST_FRAME from original submitter %s, received from %s(%s): max depth reached",originalSubmitterAddress.toString().c_str(),source().toString().c_str(),_remoteAddress.toString().c_str());
return true;
}
Address upstream(source()); // save this since we might mangle it below
Multicaster::MulticastBloomFilter bloom(field(ZT_PROTO_VERB_MULTICAST_FRAME_IDX_BLOOM_FILTER,ZT_PROTO_VERB_MULTICAST_FRAME_BLOOM_FILTER_SIZE_BYTES));
- SharedPtr<Peer> propPeers[ZT_MULTICAST_PROPAGATION_BREADTH];
+ SharedPtr<Peer> propPeers[16];
unsigned int np = 0;
if (_r->topology->amSupernode()) {
@@ -567,7 +567,7 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
originalSubmitterAddress,
upstream,
bloom,
- ZT_MULTICAST_PROPAGATION_BREADTH,
+ std::min(network->multicastPropagationBreadth(),(unsigned int)16), // 16 is a sanity check
propPeers,
now);
} else if (isDuplicate) {
@@ -584,7 +584,7 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
originalSubmitterAddress,
upstream,
bloom,
- ZT_MULTICAST_PROPAGATION_BREADTH,
+ std::min(network->multicastPropagationBreadth(),(unsigned int)16), // 16 is a sanity check
propPeers,
now);
}