network: exclude default routes from checkRouteOverlaps
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy) Upstream-commit: a886fbfa4a01f7d73c9c2d836da89ecf23a40a33 Component: engine
This commit is contained in:
@@ -73,7 +73,7 @@ func networkSize(mask net.IPMask) int32 {
|
||||
|
||||
func checkRouteOverlaps(networks []netlink.Route, dockerNetwork *net.IPNet) error {
|
||||
for _, network := range networks {
|
||||
if networkOverlaps(dockerNetwork, network.IPNet) {
|
||||
if !network.Default && networkOverlaps(dockerNetwork, network.IPNet) {
|
||||
return fmt.Errorf("Network %s is already routed: '%s'", dockerNetwork, network)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user