GitHub issue #67
This commit is contained in:
parent
317995b921
commit
31ddc49da2
7 changed files with 39 additions and 19 deletions
|
@ -108,6 +108,11 @@ private:
|
|||
inline void destroyOnDelete() throw() { _destroyOnDelete = true; }
|
||||
|
||||
public:
|
||||
/**
|
||||
* Broadcast multicast group: ff:ff:ff:ff:ff:ff / 0
|
||||
*/
|
||||
static const MulticastGroup BROADCAST;
|
||||
|
||||
/**
|
||||
* Possible network states
|
||||
*/
|
||||
|
@ -157,9 +162,22 @@ public:
|
|||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
EthernetTap *t = _tap;
|
||||
if (t)
|
||||
return _tap->updateMulticastGroups(_multicastGroups);
|
||||
return false;
|
||||
if (t) {
|
||||
bool updated = _tap->updateMulticastGroups(_multicastGroups);
|
||||
if ((_config)&&(_config->enableBroadcast())) {
|
||||
if (_multicastGroups.count(BROADCAST))
|
||||
return updated;
|
||||
else {
|
||||
_multicastGroups.insert(BROADCAST);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (_multicastGroups.count(BROADCAST)) {
|
||||
_multicastGroups.erase(BROADCAST);
|
||||
return true;
|
||||
} else return updated;
|
||||
}
|
||||
} else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue