Optimize ACL performance (#994)

* Optimize rules with All groups

* Use IP sets in ACLs (nftables implementation)

* Fix squash rule when we receive optimized rules list from management
This commit is contained in:
Givi Khojanashvili
2023-07-18 13:12:50 +04:00
committed by GitHub
parent 7ebe58f20a
commit e69ec6ab6a
15 changed files with 727 additions and 114 deletions

View File

@ -6,11 +6,14 @@ import (
// Rule to handle management of rules
type Rule struct {
*nftables.Rule
id string
nftRule *nftables.Rule
nftSet *nftables.Set
ruleID string
ip []byte
}
// GetRuleID returns the rule id
func (r *Rule) GetRuleID() string {
return r.id
return r.ruleID
}