diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-10 14:59:07 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-10 14:59:07 -0700 |
commit | e071c05f1b831ed108441e49c651d617749940d2 (patch) | |
tree | c33315a64e78b3aa2c490246bac48612fb36c092 /node | |
parent | 03dc823ad7732fde2ccfa30446778fa229d69760 (diff) | |
download | infinitytier-e071c05f1b831ed108441e49c651d617749940d2.tar.gz infinitytier-e071c05f1b831ed108441e49c651d617749940d2.zip |
Add a sanity limit to legacy multicast repeater function in supernode-mode nodes, and change netconf-master to issue multicast limit (ml) instead of old p5 stuff.
Diffstat (limited to 'node')
-rw-r--r-- | node/IncomingPacket.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 1846fdcb..68771daa 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -610,11 +610,14 @@ bool IncomingPacket::_doP5_MULTICAST_FRAME(const RuntimeEnvironment *RR,const Sh setSource(RR->identity.address()); compress(); + unsigned int count = 0; for(std::vector<Address>::iterator lp(legacyPeers.begin());lp!=legacyPeers.end();++lp) { if ((*lp != origin)&&(*lp != source())) { newInitializationVector(); setDestination(*lp); RR->sw->send(*this,true); + if (++count >= 128) // harded-coded sanity limit for these legacy nodes + break; } } |