summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
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 06b3fe957..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
@@ -255,7 +255,7 @@ func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) {
}
defer func() {
if err := cmd.Process.Release(); err != nil {
- logrus.Errorf("unable to release comman process: %q", err)
+ logrus.Errorf("unable to release command process: %q", err)
}
}()
@@ -344,6 +344,7 @@ func (r *Runtime) setupRootlessPortMapping(ctr *Container, netnsPath string) (er
NetNSPath: netnsPath,
ExitFD: 3,
ReadyFD: 4,
+ TmpDir: ctr.runtime.config.TmpDir,
}
cfgJSON, err := json.Marshal(cfg)
if err != nil {
@@ -461,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