mirror of https://github.com/docker/docs.git
Merge pull request #4871 from crosbymichael/bip-exists
Return error when existing bridge does not match ip
This commit is contained in:
commit
d848e2d113
|
@ -93,6 +93,12 @@ func InitDriver(job *engine.Job) engine.Status {
|
||||||
network = addr.(*net.IPNet)
|
network = addr.(*net.IPNet)
|
||||||
} else {
|
} else {
|
||||||
network = addr.(*net.IPNet)
|
network = addr.(*net.IPNet)
|
||||||
|
// validate that the bridge ip matches the ip specified by BridgeIP
|
||||||
|
if bridgeIP != "" {
|
||||||
|
if !network.IP.Equal(net.ParseIP(bridgeIP)) {
|
||||||
|
return job.Errorf("bridge ip (%s) does not match existing bridge configuration %s", network.IP, bridgeIP)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure iptables for link support
|
// Configure iptables for link support
|
||||||
|
|
Loading…
Reference in New Issue