build: update github.com/vishvananda/netlink to 1.3.0

This includes a breaking change:
acdc658b86
route.Dst is now a zero IPNet instead of nil

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
This commit is contained in:
Etienne Champetier
2024-08-16 13:07:52 -04:00
parent 5188dc8a19
commit d924f05e12
67 changed files with 5484 additions and 773 deletions

View File

@ -10,8 +10,8 @@ type Rule struct {
Priority int
Family int
Table int
Mark int
Mask int
Mark uint32
Mask *uint32
Tos uint
TunID uint
Goto int
@ -26,6 +26,9 @@ type Rule struct {
Dport *RulePortRange
Sport *RulePortRange
IPProto int
UIDRange *RuleUIDRange
Protocol uint8
Type uint8
}
func (r Rule) String() string {
@ -39,8 +42,8 @@ func (r Rule) String() string {
to = r.Dst.String()
}
return fmt.Sprintf("ip rule %d: from %s to %s table %d",
r.Priority, from, to, r.Table)
return fmt.Sprintf("ip rule %d: from %s to %s table %d %s",
r.Priority, from, to, r.Table, r.typeString())
}
// NewRule return empty rules.
@ -49,8 +52,8 @@ func NewRule() *Rule {
SuppressIfgroup: -1,
SuppressPrefixlen: -1,
Priority: -1,
Mark: -1,
Mask: -1,
Mark: 0,
Mask: nil,
Goto: -1,
Flow: -1,
}
@ -66,3 +69,14 @@ type RulePortRange struct {
Start uint16
End uint16
}
// NewRuleUIDRange creates rule uid range.
func NewRuleUIDRange(start, end uint32) *RuleUIDRange {
return &RuleUIDRange{Start: start, End: end}
}
// RuleUIDRange represents rule uid range.
type RuleUIDRange struct {
Start uint32
End uint32
}