summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-01 09:27:33 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-01 09:27:33 -0700
commit681af253efc1d916530cf41c4b045a89e07077c8 (patch)
treedfaeebc2b33e9e883678c8c83daaff8f0d16ac32
parent88bdb81791e7879c6c199d6e9d03a326ec786484 (diff)
downloadinfinitytier-681af253efc1d916530cf41c4b045a89e07077c8.tar.gz
infinitytier-681af253efc1d916530cf41c4b045a89e07077c8.zip
Fix for GitHub issue #88 - actually do in the code what the web UI expects it to do.
-rw-r--r--node/NetworkConfig.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp
index 28db83fe..a6f668aa 100644
--- a/node/NetworkConfig.hpp
+++ b/node/NetworkConfig.hpp
@@ -105,11 +105,11 @@ public:
inline bool permitsEtherType(unsigned int etherType) const
throw()
{
- if ((!etherType)||(etherType > 0xffff)) // sanity checks
+ if ((etherType <= 0)||(etherType > 0xffff)) // sanity checks
return false;
- else if ((_etWhitelist[0] & 1)) // prsence of 0 in set inverts sense: whitelist becomes blacklist
- return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) == 0);
- else return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) != 0);
+ if ((_etWhitelist[0] & 1)) // presence of 0 means allow all
+ return true;
+ return ((_etWhitelist[etherType >> 3] & (1 << (etherType & 7))) != 0);
}
std::set<unsigned int> allowedEtherTypes() const;