diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-08 15:08:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 15:08:17 -0800 |
commit | c611db2bc08df6bca8a921852998c842dae4f2cb (patch) | |
tree | 4ea8d394d8091a2801fcf626a0f412361f83e175 /libpod/networking_linux.go | |
parent | 3a4c4bad6798dce7ce9ea85fbd53fe48daf98084 (diff) | |
parent | 46e672bad6d7d616961ae0fc7fb0b484951ef07d (diff) | |
download | podman-c611db2bc08df6bca8a921852998c842dae4f2cb.tar.gz podman-c611db2bc08df6bca8a921852998c842dae4f2cb.tar.bz2 podman-c611db2bc08df6bca8a921852998c842dae4f2cb.zip |
Merge pull request #1787 from baude/netstatusrework
correct assignment of networkStatus
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r-- | libpod/networking_linux.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 863a764e2..212485d8a 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -64,20 +64,20 @@ func (r *Runtime) configureNetNS(ctr *Container, ctrNS ns.NetNS) ([]*cnitypes.Re } }() - networkStatus := make([]*cnitypes.Result, 1) + networkStatus := make([]*cnitypes.Result, 0) for idx, r := range results { logrus.Debugf("[%d] CNI result: %v", idx, r.String()) resultCurrent, err := cnitypes.GetResult(r) if err != nil { return nil, errors.Wrapf(err, "error parsing CNI plugin result %q: %v", r.String(), err) } - networkStatus = append(ctr.state.NetworkStatus, resultCurrent) + networkStatus = append(networkStatus, resultCurrent) } // Add firewall rules to ensure the container has network access. // Will not be necessary once CNI firewall plugin merges upstream. // https://github.com/containernetworking/plugins/pull/75 - for _, netStatus := range ctr.state.NetworkStatus { + for _, netStatus := range networkStatus { firewallConf := &firewall.FirewallNetConf{ PrevResult: netStatus, } |