mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Check if IPv6 is enabled before restoring the network pools
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
ff48f9fdb1
commit
989d9b2cc4
1 changed files with 5 additions and 3 deletions
|
@ -753,9 +753,11 @@ func (c *controller) reservePools() {
|
|||
c.Gateway = n.ipamV4Info[i].Gateway.IP.String()
|
||||
}
|
||||
}
|
||||
for i, c := range n.ipamV6Config {
|
||||
if c.Gateway == "" && n.ipamV6Info[i].Gateway != nil {
|
||||
c.Gateway = n.ipamV6Info[i].Gateway.IP.String()
|
||||
if n.enableIPv6 {
|
||||
for i, c := range n.ipamV6Config {
|
||||
if c.Gateway == "" && n.ipamV6Info[i].Gateway != nil {
|
||||
c.Gateway = n.ipamV6Info[i].Gateway.IP.String()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reserve pools
|
||||
|
|
Loading…
Reference in a new issue