summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-06 14:53:27 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-06 14:53:27 -0700
commit1632aec102f6cd03006bfa1c296f266928a0d9c4 (patch)
tree6e43953c04955bf540a3365348ab8d848bbc0af0 /node
parent255320e2a6f340fca6c53f3a0516f99a4cb4562b (diff)
downloadinfinitytier-1632aec102f6cd03006bfa1c296f266928a0d9c4.tar.gz
infinitytier-1632aec102f6cd03006bfa1c296f266928a0d9c4.zip
Check Network::isAllowed() always on multicast send.
Diffstat (limited to 'node')
-rw-r--r--node/OutboundMulticast.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp
index f62046be..bda7ab00 100644
--- a/node/OutboundMulticast.cpp
+++ b/node/OutboundMulticast.cpp
@@ -102,8 +102,14 @@ void OutboundMulticast::init(
void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toAddr)
{
+ SharedPtr<Network> network(RR->node->network(_nwid));
+
+ if (!network)
+ return;
+ if (!network->isAllowed(toAddr))
+ return;
+
if (_haveCom) {
- SharedPtr<Network> network(RR->node->network(_nwid));
if (network->peerNeedsOurMembershipCertificate(toAddr,RR->node->now())) {
_packetWithCom.newInitializationVector();
_packetWithCom.setDestination(toAddr);
@@ -112,6 +118,7 @@ void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toA
return;
}
}
+
//TRACE(">>MC %.16llx -> %s (without COM)",(unsigned long long)this,toAddr.toString().c_str());
_packetNoCom.newInitializationVector();
_packetNoCom.setDestination(toAddr);