mirror of
https://github.com/netbirdio/go-netroute.git
synced 2026-05-22 17:11:07 -07:00
fixup
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
package netroute
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/google/gopacket/routing"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ func (r *winRouter) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface
|
||||
}
|
||||
iface = getIface(route.index)
|
||||
|
||||
if route.nextHop.Addr.Family == 0 /* AF_UNDEF */ {
|
||||
if route nextHop == nil || route.nextHop.Addr.Family == 0 /* AF_UNDEF */ {
|
||||
return iface, nil, pref, nil
|
||||
}
|
||||
addr, err := route.nextHop.Sockaddr()
|
||||
|
||||
Reference in New Issue
Block a user