Use local handle, not package handle for link lookups

This commit is contained in:
Hasan Mahmood 2024-02-22 16:18:12 -06:00 committed by Alessandro Boch
parent 42d9a053ea
commit 6ab7f5a376
1 changed files with 3 additions and 3 deletions

View File

@ -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
}