瀏覽代碼

Initializing generic to emtpy map

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Madhu Venugopal 9 年之前
父節點
當前提交
3365af97c2
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libnetwork/controller.go

+ 2 - 0
libnetwork/controller.go

@@ -59,6 +59,7 @@ import (
 	"github.com/docker/libnetwork/driverapi"
 	"github.com/docker/libnetwork/driverapi"
 	"github.com/docker/libnetwork/hostdiscovery"
 	"github.com/docker/libnetwork/hostdiscovery"
 	"github.com/docker/libnetwork/ipamapi"
 	"github.com/docker/libnetwork/ipamapi"
+	"github.com/docker/libnetwork/netlabel"
 	"github.com/docker/libnetwork/osl"
 	"github.com/docker/libnetwork/osl"
 	"github.com/docker/libnetwork/types"
 	"github.com/docker/libnetwork/types"
 )
 )
@@ -330,6 +331,7 @@ func (c *controller) NewNetwork(networkType, name string, options ...NetworkOpti
 	network := &network{
 	network := &network{
 		name:        name,
 		name:        name,
 		networkType: networkType,
 		networkType: networkType,
+		generic:     map[string]interface{}{netlabel.GenericData: make(map[string]string)},
 		ipamType:    ipamapi.DefaultIPAM,
 		ipamType:    ipamapi.DefaultIPAM,
 		id:          stringid.GenerateRandomID(),
 		id:          stringid.GenerateRandomID(),
 		ctrlr:       c,
 		ctrlr:       c,