fixup

parent fb84409e
......@@ -21,8 +21,13 @@ func (r *router) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface *n
if dst.Equal(preferredSrc) {
gateway = nil
}
return iface, gateway, preferredSrc, err
}
func New() (routing.Router, error) {
return router{routing.New()}
r, err := routing.New()
if err != nil {
return nil, err
}
return router{r}, nil
}
......@@ -222,7 +222,7 @@ func (r *winRouter) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface
}
iface = getIface(route.index)
if route nextHop == nil || 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