summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-23 23:44:59 +0100
committerGitHub <noreply@github.com>2020-11-23 23:44:59 +0100
commit4fe7c3f7bc8a1d20a23e87783b6a17b887c782e1 (patch)
tree5a1bf405ca0a8281834184f2f66380100f65db9f /libpod/networking_linux.go
parentcd6c4cb0affdb1e8a647079b2808da6bf833d543 (diff)
parent1ddb19bc8e5ba036a3539fe63c6b9fb241eea099 (diff)
downloadpodman-4fe7c3f7bc8a1d20a23e87783b6a17b887c782e1.tar.gz
podman-4fe7c3f7bc8a1d20a23e87783b6a17b887c782e1.tar.bz2
podman-4fe7c3f7bc8a1d20a23e87783b6a17b887c782e1.zip
Merge pull request #8455 from baude/jhoncompat
Jhoncompat
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r--libpod/networking_linux.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 7a0bebd95..4e7ffaf81 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -900,7 +900,7 @@ func (c *Container) getContainerNetworkInfo() (*define.InspectNetworkSettings, e
// If we have CNI networks - handle that here
if len(networks) > 0 && !isDefault {
if len(networks) != len(c.state.NetworkStatus) {
- return nil, errors.Wrapf(define.ErrInternal, "network inspection mismatch: asked to join %d CNI networks but have information on %d networks", len(networks), len(c.state.NetworkStatus))
+ return nil, errors.Wrapf(define.ErrInternal, "network inspection mismatch: asked to join %d CNI network(s) %v, but have information on %d network(s)", len(networks), networks, len(c.state.NetworkStatus))
}
settings.Networks = make(map[string]*define.InspectAdditionalNetwork)
@@ -1144,8 +1144,8 @@ func (c *Container) NetworkConnect(nameOrID, netName string, aliases []string) e
// build a list of network names so we can sort and
// get the new name's index
var networkNames []string
- for netName := range networks {
- networkNames = append(networkNames, netName)
+ for name := range networks {
+ networkNames = append(networkNames, name)
}
networkNames = append(networkNames, netName)
// sort
@@ -1157,6 +1157,7 @@ func (c *Container) NetworkConnect(nameOrID, netName string, aliases []string) e
// populate network status
copy(networkStatus[index+1:], networkStatus[index:])
networkStatus[index] = networkResults[0]
+ c.state.NetworkStatus = networkStatus
}
c.newNetworkEvent(events.NetworkConnect, netName)
return c.save()