mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Vendoring libnetwork @802895f
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
e07c392c49
commit
9e555ce7c3
17 changed files with 159 additions and 141 deletions
10
vendor/github.com/docker/libnetwork/controller.go
generated
vendored
10
vendor/github.com/docker/libnetwork/controller.go
generated
vendored
|
@ -567,6 +567,12 @@ func (c *controller) pushNodeDiscovery(d driverapi.Driver, cap driverapi.Capabil
|
|||
if c.cfg != nil {
|
||||
addr := strings.Split(c.cfg.Cluster.Address, ":")
|
||||
self = net.ParseIP(addr[0])
|
||||
// if external kvstore is not configured, try swarm-mode config
|
||||
if self == nil {
|
||||
if agent := c.getAgent(); agent != nil {
|
||||
self = net.ParseIP(agent.advertiseAddr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if d == nil || cap.DataScope != datastore.GlobalScope || nodes == nil {
|
||||
|
@ -647,8 +653,8 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ...
|
|||
}
|
||||
}
|
||||
|
||||
if err := config.ValidateName(name); err != nil {
|
||||
return nil, ErrInvalidName(err.Error())
|
||||
if !config.IsValidName(name) {
|
||||
return nil, ErrInvalidName(name)
|
||||
}
|
||||
|
||||
if id == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue