mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix cleanup logic in case of ipv6 allocation failure
- When creating a network with both IPv4 and IPv6 subnets, if the allocation of the IPv6 pool fails, the already reserved IPv4 pool does not get released. Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
f1780a1fd9
commit
d0f96c5846
1 changed files with 6 additions and 1 deletions
|
@ -1094,7 +1094,12 @@ func (n *network) ipamAllocate() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
return n.ipamAllocateVersion(6, ipam)
|
||||
err = n.ipamAllocateVersion(6, ipam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *network) requestPoolHelper(ipam ipamapi.Ipam, addressSpace, preferredPool, subPool string, options map[string]string, v6 bool) (string, *net.IPNet, map[string]string, error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue