|
@@ -305,10 +305,6 @@ func (daemon *Daemon) createNetwork(cfg *config.Config, create types.NetworkCrea
|
|
return nil, errdefs.Forbidden(errors.New(`This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.`))
|
|
return nil, errdefs.Forbidden(errors.New(`This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.`))
|
|
}
|
|
}
|
|
|
|
|
|
- if network.HasIPv6Subnets(create.IPAM) {
|
|
|
|
- create.EnableIPv6 = true
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
networkOptions := make(map[string]string)
|
|
networkOptions := make(map[string]string)
|
|
for k, v := range create.Options {
|
|
for k, v := range create.Options {
|
|
networkOptions[k] = v
|
|
networkOptions[k] = v
|
|
@@ -335,7 +331,7 @@ func (daemon *Daemon) createNetwork(cfg *config.Config, create types.NetworkCrea
|
|
nwOptions = append(nwOptions, libnetwork.NetworkOptionConfigOnly())
|
|
nwOptions = append(nwOptions, libnetwork.NetworkOptionConfigOnly())
|
|
}
|
|
}
|
|
|
|
|
|
- if err := network.ValidateIPAM(create.IPAM); err != nil {
|
|
|
|
|
|
+ if err := network.ValidateIPAM(create.IPAM, create.EnableIPv6); err != nil {
|
|
return nil, errdefs.InvalidParameter(err)
|
|
return nil, errdefs.InvalidParameter(err)
|
|
}
|
|
}
|
|
|
|
|