Preserve default ipam driver setting

- If IPAMConf does not contain an ipam driver setting

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch 2015-10-09 13:57:49 -07:00
parent 0e04c8555e
commit af95bfd273
1 changed files with 3 additions and 1 deletions

View File

@ -495,7 +495,9 @@ func NetworkOptionPersist(persist bool) NetworkOption {
// NetworkOptionIpam function returns an option setter for the ipam configuration for this network
func NetworkOptionIpam(ipamDriver string, addrSpace string, ipV4 []*IpamConf, ipV6 []*IpamConf) NetworkOption {
return func(n *network) {
n.ipamType = ipamDriver
if ipamDriver != "" {
n.ipamType = ipamDriver
}
n.addrSpace = addrSpace
n.ipamV4Config = ipV4
n.ipamV6Config = ipV6