fix: fix ip rule goto bug

This commit is contained in:
yandong.yan 2019-06-04 09:59:58 +08:00 committed by Alessandro Boch
parent db99c040b9
commit c8c507c80e
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ func ruleHandle(rule *Rule, req *nl.NetlinkRequest) error {
req.AddData(nl.NewRtAttr(nl.FRA_OIFNAME, []byte(rule.OifName)))
}
if rule.Goto >= 0 {
msg.Type = nl.FR_ACT_NOP
msg.Type = nl.FR_ACT_GOTO
b := make([]byte, 4)
native.PutUint32(b, uint32(rule.Goto))
req.AddData(nl.NewRtAttr(nl.FRA_GOTO, b))