Fix CI: recognize multi-value port set lookups in tests and correct PeerIP lint suppression

This commit is contained in:
Viktor Liu
2026-06-10 21:11:43 +02:00
parent ab7639d101
commit 97d9559e6d
3 changed files with 39 additions and 20 deletions
@@ -780,6 +780,14 @@ func containsPort(exprs []expr.Any, port *firewall.Port, isSource bool) bool {
}
}
}
case *expr.Lookup:
// Multiple discrete ports compile to an anonymous set lookup
// rather than a chain of comparisons. The set's id and name are
// assigned dynamically, so matching the lookup is enough here;
// the set elements are verified separately.
if !port.IsRange && len(port.Values) > 1 {
portMatchFound = true
}
}
if payloadFound && portMatchFound {
return true