mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-30 08:19:09 +01:00
Fix CI: recognize multi-value port set lookups in tests and correct PeerIP lint suppression
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user