mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Few more fixes identified during integration
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
23d35bcb4e
commit
50db985c1d
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,7 @@ type IpamConf struct {
|
||||||
// Validate checks whether the configuration is valid
|
// Validate checks whether the configuration is valid
|
||||||
func (c *IpamConf) Validate() error {
|
func (c *IpamConf) Validate() error {
|
||||||
if c.Gateway != "" && nil == net.ParseIP(c.Gateway) {
|
if c.Gateway != "" && nil == net.ParseIP(c.Gateway) {
|
||||||
return types.BadRequestErrorf("invalid gateway address %s in IpamConf dtructure", c.Gateway)
|
return types.BadRequestErrorf("invalid gateway address %s in Ipam configuration", c.Gateway)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -497,6 +497,9 @@ func NetworkOptionLabels(labels map[string]string) NetworkOption {
|
||||||
if n.generic == nil {
|
if n.generic == nil {
|
||||||
n.generic = make(map[string]interface{})
|
n.generic = make(map[string]interface{})
|
||||||
}
|
}
|
||||||
|
if labels == nil {
|
||||||
|
labels = make(map[string]string)
|
||||||
|
}
|
||||||
// Store the options
|
// Store the options
|
||||||
n.generic[netlabel.GenericData] = labels
|
n.generic[netlabel.GenericData] = labels
|
||||||
// Decode and store the endpoint options of libnetwork interest
|
// Decode and store the endpoint options of libnetwork interest
|
||||||
|
|
Loading…
Add table
Reference in a new issue