mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-16 19:46:52 +01:00
Don't check port any firewall rules twice for packets without ports
This commit is contained in:
1 parent
11b04517f3
commit
30cf2bbe6c
1 file changed
+2
-1
+2
-1
@@ -755,7 +755,8 @@ func (fp firewallPort) match(p *firewall.Packet, incoming bool, c *cert.CachedCe
|
|||||||
port = int32(p.RemotePort)
|
port = int32(p.RemotePort)
|
||||||
}
|
}
|
||||||
|
|
||||||
if fp[port].match(p, c, caPool) {
|
// Packets without ports (gre, esp, etc) have port 0, which is PortAny, don't check those rules twice
|
||||||
|
if port != firewall.PortAny && fp[port].match(p, c, caPool) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user