From 77d9fd262828c0c626b2093e8a62e05cc130905e Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Fri, 17 Jan 2014 16:30:27 -0800 Subject: [PATCH] netlink: make darwin happy Docker-DCO-1.1-Signed-off-by: Johan Euphrosine (github: proppy) --- network.go | 2 +- pkg/netlink/netlink_darwin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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") }