diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 21:22:51 -0500 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 21:22:51 -0500 |
commit | 939ab43ceb3f4c0b7bf6d946f55f6a8e70d8fd4e (patch) | |
tree | 1a3d43a312698788b496144166b9ece4779258a5 | |
parent | d3d58ba8a7999d52bbccb7c29d86c12c4f879e84 (diff) | |
download | infinitytier-939ab43ceb3f4c0b7bf6d946f55f6a8e70d8fd4e.tar.gz infinitytier-939ab43ceb3f4c0b7bf6d946f55f6a8e70d8fd4e.zip |
Do not send to origin in second buffered multicast path.
-rw-r--r-- | node/Multicaster.cpp | 3 | ||||
-rw-r--r-- | node/OutboundMulticast.hpp | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index c5cf456b..9845c6cd 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -345,6 +345,9 @@ void Multicaster::send( data, len); + if (origin) + out.logAsSent(origin); + unsigned int count = 0; for(unsigned int i=0;i<activeBridgeCount;++i) { diff --git a/node/OutboundMulticast.hpp b/node/OutboundMulticast.hpp index 836b840b..a735f52b 100644 --- a/node/OutboundMulticast.hpp +++ b/node/OutboundMulticast.hpp @@ -126,6 +126,16 @@ public: } /** + * Log an address as having been used so we will not send there in the future + * + * @param toAddr Address to log as sent + */ + inline void logAsSent(const Address &toAddr) + { + _alreadySentTo.push_back(toAddr); + } + + /** * Try to send this to a given peer if it hasn't been sent to them already * * @param RR Runtime environment |