policyutil: fix reduceCapGrantRule and add route reduction
reduceCapGrantRule was dropping rules whose CapGrant IPs overlap a subnet route; treat subnet routes as part of node identity so those rules survive reduction. ReduceFilterRules now also reduces route-reachable destinations. Updates #3157
This commit is contained in:
parent
b051e7b2bc
commit
ded51a4d30
3 changed files with 553 additions and 63 deletions
9
hscontrol/policy/policyutil/doc.go
Normal file
9
hscontrol/policy/policyutil/doc.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Package policyutil contains pure functions that transform compiled
|
||||
// policy rules for a specific node. The headline function is
|
||||
// ReduceFilterRules, which filters global rules down to those relevant
|
||||
// to one node.
|
||||
//
|
||||
// A node's SubnetRoutes (approved, non-exit) participate in rule
|
||||
// matching so subnet routers receive filter rules for destinations
|
||||
// their subnets cover — the fix for issue #3169.
|
||||
package policyutil
|
||||
Loading…
Add table
Add a link
Reference in a new issue