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 #637 due to it being introduced by #623, which was
merged just recently.

Signed-off-by: Tobias Klauser <[email protected]>
  • Loading branch information
tklauser authored and aboch committed May 10, 2021
1 parent 4ef7bcb commit d17758a
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 @@ -1200,10 +1200,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 d17758a

Please sign in to comment.