mirror of
https://github.com/vishvananda/netlink.git
synced 2025-10-07 00:32:49 +08:00
fix: fix ip rule goto bug
This commit is contained in:

committed by
Alessandro Boch

parent
db99c040b9
commit
c8c507c80e
@@ -144,7 +144,7 @@ func ruleHandle(rule *Rule, req *nl.NetlinkRequest) error {
|
|||||||
req.AddData(nl.NewRtAttr(nl.FRA_OIFNAME, []byte(rule.OifName)))
|
req.AddData(nl.NewRtAttr(nl.FRA_OIFNAME, []byte(rule.OifName)))
|
||||||
}
|
}
|
||||||
if rule.Goto >= 0 {
|
if rule.Goto >= 0 {
|
||||||
msg.Type = nl.FR_ACT_NOP
|
msg.Type = nl.FR_ACT_GOTO
|
||||||
b := make([]byte, 4)
|
b := make([]byte, 4)
|
||||||
native.PutUint32(b, uint32(rule.Goto))
|
native.PutUint32(b, uint32(rule.Goto))
|
||||||
req.AddData(nl.NewRtAttr(nl.FRA_GOTO, b))
|
req.AddData(nl.NewRtAttr(nl.FRA_GOTO, b))
|
||||||
|
Reference in New Issue
Block a user