mirror of https://github.com/docker/docs.git
network: exclude default routes from checkRouteOverlaps
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
This commit is contained in:
parent
26726dc9ff
commit
a886fbfa4a
|
@ -73,7 +73,7 @@ func networkSize(mask net.IPMask) int32 {
|
||||||
|
|
||||||
func checkRouteOverlaps(networks []netlink.Route, dockerNetwork *net.IPNet) error {
|
func checkRouteOverlaps(networks []netlink.Route, dockerNetwork *net.IPNet) error {
|
||||||
for _, network := range networks {
|
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)
|
return fmt.Errorf("Network %s is already routed: '%s'", dockerNetwork, network)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue