Skip to content

Commit

Permalink
Don't re-initialize package level var native in (*Handle).RouteGetWit…
Browse files Browse the repository at this point in the history
…hOptions

This was missed in vishvananda#637 due to it being introduced by vishvananda#623, which was
merged just recently.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser authored and conjones committed Jun 22, 2022
1 parent 59bb849 commit 99a38f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions route_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1219,10 +1219,7 @@ func (h *Handle) RouteGetWithOptions(destination net.IP, options *RouteGetOption
return nil, err
}

var (
b = make([]byte, 4)
native = nl.NativeEndian()
)
b := make([]byte, 4)
native.PutUint32(b, uint32(link.Attrs().Index))

req.AddData(nl.NewRtAttr(unix.RTA_IIF, b))
Expand Down

0 comments on commit 99a38f4

Please sign in to comment.