From 50db985c1d691b7cbc5bf240bab6ad928a7fba0e Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Sat, 10 Oct 2015 03:49:09 -0700 Subject: [PATCH] Few more fixes identified during integration Signed-off-by: Madhu Venugopal --- libnetwork/network.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libnetwork/network.go b/libnetwork/network.go index a4374f5145..29c4d51729 100644 --- a/libnetwork/network.go +++ b/libnetwork/network.go @@ -86,7 +86,7 @@ type IpamConf struct { // Validate checks whether the configuration is valid func (c *IpamConf) Validate() error { 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 } @@ -497,6 +497,9 @@ func NetworkOptionLabels(labels map[string]string) NetworkOption { if n.generic == nil { n.generic = make(map[string]interface{}) } + if labels == nil { + labels = make(map[string]string) + } // Store the options n.generic[netlabel.GenericData] = labels // Decode and store the endpoint options of libnetwork interest