summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-13 20:51:38 +0100
committerGitHub <noreply@github.com>2020-01-13 20:51:38 +0100
commitc1d93666d4b175be29a0ba229ee0b94d50765888 (patch)
tree64a7973fe32769f0753a1ee56c60e213df342986
parente83a1b87da0c2b88ebd69828a79d4b9ecf11b0dc (diff)
parent6e2ed9ad2efb16062b4d7984db91a239cd102ed9 (diff)
downloadpodman-c1d93666d4b175be29a0ba229ee0b94d50765888.tar.gz
podman-c1d93666d4b175be29a0ba229ee0b94d50765888.tar.bz2
podman-c1d93666d4b175be29a0ba229ee0b94d50765888.zip
Merge pull request #4853 from mheon/do_not_configure_with_slirp
Do not configure CNI when slirp4netns is requested
-rw-r--r--libpod/networking_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 5db749a4d..d90bcb708 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -148,7 +148,7 @@ func (r *Runtime) createNetNS(ctr *Container) (n ns.NetNS, q []*cnitypes.Result,
logrus.Debugf("Made network namespace at %s for container %s", ctrNS.Path(), ctr.ID())
networkStatus := []*cnitypes.Result{}
- if !rootless.IsRootless() {
+ if !rootless.IsRootless() && ctr.config.NetMode != "slirp4netns" {
networkStatus, err = r.configureNetNS(ctr, ctrNS)
}
return ctrNS, networkStatus, err
@@ -462,7 +462,7 @@ func (r *Runtime) teardownNetNS(ctr *Container) error {
logrus.Debugf("Tearing down network namespace at %s for container %s", ctr.state.NetNS.Path(), ctr.ID())
// rootless containers do not use the CNI plugin
- if !rootless.IsRootless() {
+ if !rootless.IsRootless() && ctr.config.NetMode != "slirp4netns" {
var requestedIP net.IP
if ctr.requestedIP != nil {
requestedIP = ctr.requestedIP