diff --git a/route_linux.go b/route_linux.go index d9f715ce..2846f3c7 100644 --- a/route_linux.go +++ b/route_linux.go @@ -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))