This commit is contained in:
JackDoan committed 2026-09-30 14:46:44 -05:00
1 parent c4b9df20ac
commit 1cfed59214
2 files changed
+9 -23

No files matched your search

+9 -5
View File
@@ -110,11 +110,15 @@ func (t *Table) Match(p *Packet, incoming bool, c *cert.CachedCertificate, caPoo
return false
}
// The index yields every rule whose proto and port clauses allow p. The packet is allowed when the
// remaining clauses of any of those rules allow it as well.
return proto.whichMatch(p, incoming).any(func(id int) bool {
return t.rules[id].match(p, c, caPool)
})
// The index yields every rule whose proto and port clauses allow p.
// The packet is allowed when the remaining clauses of any of those rules allow it as well.
for id := range proto.whichMatch(p, incoming).all() {
if t.rules[id].match(p, c, caPool) {
return true
}
}
return false
}
// match reports whether r allows p from the peer with certificate c. The port clause is not checked here; the