mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-21 10:01:46 +00:00
Check for subscribed multicast groups should be able to check groups bridged behind me.
This commit is contained in:
parent
4e691c8e22
commit
758bf949db
@ -81,7 +81,7 @@ unsigned int Multicaster::gather(const Address &queryingPeer,uint64_t nwid,const
|
||||
|
||||
{ // Return myself if I am a member of this group
|
||||
SharedPtr<Network> network(RR->node->network(nwid));
|
||||
if ((network)&&(network->subscribedToMulticastGroup(mg))) {
|
||||
if ((network)&&(network->subscribedToMulticastGroup(mg,true))) {
|
||||
RR->identity.address().appendTo(appendTo);
|
||||
++totalKnown;
|
||||
++added;
|
||||
|
@ -116,10 +116,14 @@ public:
|
||||
* @param mg Multicast group
|
||||
* @return True if this network endpoint / peer is a member
|
||||
*/
|
||||
bool subscribedToMulticastGroup(const MulticastGroup &mg) const
|
||||
bool subscribedToMulticastGroup(const MulticastGroup &mg,bool includeBridgedGroups) const
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
return (std::find(_myMulticastGroups.begin(),_myMulticastGroups.end(),mg) != _myMulticastGroups.end());
|
||||
if (std::find(_myMulticastGroups.begin(),_myMulticastGroups.end(),mg) != _myMulticastGroups.end())
|
||||
return true;
|
||||
else if (includeBridgedGroups)
|
||||
return (_multicastGroupsBehindMe.find(mg) != _multicastGroupsBehindMe.end());
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user