From 6ab7f5a3765c5106880f75fc69e48a9c06d8f6a2 Mon Sep 17 00:00:00 2001 From: Hasan Mahmood Date: Thu, 22 Feb 2024 16:18:12 -0600 Subject: [PATCH] Use local handle, not package handle for link lookups --- route_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/route_linux.go b/route_linux.go index f9a47a0..99467df 100644 --- a/route_linux.go +++ b/route_linux.go @@ -1476,7 +1476,7 @@ func (h *Handle) RouteGetWithOptions(destination net.IP, options *RouteGetOption if options != nil { if options.VrfName != "" { - link, err := LinkByName(options.VrfName) + link, err := h.LinkByName(options.VrfName) if err != nil { return nil, err } @@ -1488,7 +1488,7 @@ func (h *Handle) RouteGetWithOptions(destination net.IP, options *RouteGetOption iifIndex := 0 if len(options.Iif) > 0 { - link, err := LinkByName(options.Iif) + link, err := h.LinkByName(options.Iif) if err != nil { return nil, err } @@ -1506,7 +1506,7 @@ func (h *Handle) RouteGetWithOptions(destination net.IP, options *RouteGetOption } if len(options.Oif) > 0 { - link, err := LinkByName(options.Oif) + link, err := h.LinkByName(options.Oif) if err != nil { return nil, err }