mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Fix for GitHub issue #88 - actually do in the code what the web UI expects it to do.
This commit is contained in:
parent
88bdb81791
commit
681af253ef
1 changed files with 4 additions and 4 deletions
|
@ -105,11 +105,11 @@ public:
|
||||||
inline bool permitsEtherType(unsigned int etherType) const
|
inline bool permitsEtherType(unsigned int etherType) const
|
||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
if ((!etherType)||(etherType > 0xffff)) // sanity checks
|
if ((etherType <= 0)||(etherType > 0xffff)) // sanity checks
|
||||||
return false;
|
return false;
|
||||||
else if ((_etWhitelist[0] & 1)) // prsence of 0 in set inverts sense: whitelist becomes blacklist
|
if ((_etWhitelist[0] & 1)) // presence of 0 means allow all
|
||||||
return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) == 0);
|
return true;
|
||||||
else return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) != 0);
|
return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<unsigned int> allowedEtherTypes() const;
|
std::set<unsigned int> allowedEtherTypes() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue