diff --git a/network.go b/network.go index 64be094f0c..1139f6ad37 100644 --- a/network.go +++ b/network.go @@ -73,7 +73,7 @@ func networkSize(mask net.IPMask) int32 { func checkRouteOverlaps(networks []netlink.Route, dockerNetwork *net.IPNet) error { for _, network := range networks { - if !network.Default && networkOverlaps(dockerNetwork, network.IPNet) { + if network.IPNet != nil && networkOverlaps(dockerNetwork, network.IPNet) { return fmt.Errorf("Network %s is already routed: '%s'", dockerNetwork, network) } } diff --git a/pkg/netlink/netlink_darwin.go b/pkg/netlink/netlink_darwin.go index dcc60b6764..298508ad10 100644 --- a/pkg/netlink/netlink_darwin.go +++ b/pkg/netlink/netlink_darwin.go @@ -5,7 +5,7 @@ import ( "net" ) -func NetworkGetRoutes() ([]*net.IPNet, error) { +func NetworkGetRoutes() ([]Route, error) { return nil, fmt.Errorf("Not implemented") }