mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-13 14:18:47 +01:00
22 lines
334 B
Go
22 lines
334 B
Go
package nftables
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/google/nftables"
|
|
)
|
|
|
|
// Rule to handle management of rules
|
|
type Rule struct {
|
|
nftRule *nftables.Rule
|
|
mangleRule *nftables.Rule
|
|
nftSet *nftables.Set
|
|
ruleID string
|
|
ip net.IP
|
|
}
|
|
|
|
// GetRuleID returns the rule id
|
|
func (r *Rule) GetRuleID() string {
|
|
return r.ruleID
|
|
}
|