From 1632aec102f6cd03006bfa1c296f266928a0d9c4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 6 Jul 2015 14:53:27 -0700 Subject: Check Network::isAllowed() always on multicast send. --- node/OutboundMulticast.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'node') 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(RR->node->network(_nwid)); + + if (!network) + return; + if (!network->isAllowed(toAddr)) + return; + if (_haveCom) { - SharedPtr 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); -- cgit v1.2.3