Apply wildcard deny and hop limits to zero-scope floods
This commit is contained in:
1 parent
755895c7e0
commit
0eace6b694
4 files changed
+93
-3
No files matched your search
@@ -288,7 +288,10 @@ int RegionMap::getTransportKeysFor(const RegionEntry& src, TransportKey dest[],
|
||||
}
|
||||
|
||||
RegionEntry* RegionMap::findMatch(const mesh::Packet* packet, uint8_t mask) {
|
||||
if (packet->transport_codes[0] == 0) return &wildcard;
|
||||
if (packet->transport_codes[0] == 0) {
|
||||
// Zero means unscoped, not an exemption from the wildcard's deny policy.
|
||||
return (wildcard.flags & mask) == 0 ? &wildcard : NULL;
|
||||
}
|
||||
for (int i = 0; i < num_regions; i++) {
|
||||
auto region = ®ions[i];
|
||||
if ((region->flags & mask) == 0) { // does region allow this? (per 'mask' param)
|
||||
|
||||
Reference in new issue
Block a user