summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-11-23 12:25:29 -0600
committerbaude <bbaude@redhat.com>2020-11-23 15:20:39 -0600
commit1ddb19bc8e5ba036a3539fe63c6b9fb241eea099 (patch)
tree5a1bf405ca0a8281834184f2f66380100f65db9f /libpod
parent44da01f45cd941f44d2025864c91b0d2942d2a20 (diff)
downloadpodman-1ddb19bc8e5ba036a3539fe63c6b9fb241eea099.tar.gz
podman-1ddb19bc8e5ba036a3539fe63c6b9fb241eea099.tar.bz2
podman-1ddb19bc8e5ba036a3539fe63c6b9fb241eea099.zip
update container status with new results
a bug was being caused by the fact that the container network results were not being updated properly. given that jhon is on PTO, this PR will replace #8362 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/networking_linux.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index baa11935d..4e7ffaf81 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -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()