mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Return error when existing bridge does not match ip
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
ab00619c56
commit
baba9cde95
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue