summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-11-26 21:31:06 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-11-28 09:21:59 +0100
commit95f22a2ca055d6dec0281cee109375dc4fd9b78b (patch)
treefb916a4b5e4960cada05db5c57f2aae5175009f2 /libpod/oci.go
parent4203df69aca13f14e43ad32a9b7ffb6cfb8c1016 (diff)
downloadpodman-95f22a2ca055d6dec0281cee109375dc4fd9b78b.tar.gz
podman-95f22a2ca055d6dec0281cee109375dc4fd9b78b.tar.bz2
podman-95f22a2ca055d6dec0281cee109375dc4fd9b78b.zip
network: allow slirp4netns mode also for root containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index a7aec06e5..e9cceda82 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -329,7 +329,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
cmd.ExtraFiles = append(cmd.ExtraFiles, ports...)
}
- if rootless.IsRootless() {
+ if ctr.config.NetMode.IsSlirp4netns() {
ctr.rootlessSlirpSyncR, ctr.rootlessSlirpSyncW, err = os.Pipe()
if err != nil {
return errors.Wrapf(err, "failed to create rootless network sync pipe")