fixup

parent 7b351d86
......@@ -3,6 +3,8 @@
package netroute
import (
"net"
"github.com/google/gopacket/routing"
)
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment