This commit is contained in:
Will Scott
2020-03-08 12:51:43 -07:00
parent 7b351d8698
commit fb84409e2a
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -3,6 +3,8 @@
package netroute
import (
"net"
"github.com/google/gopacket/routing"
)
+1 -1
View File
@@ -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()