summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-11-08 20:35:22 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-11-09 15:58:57 +0100
commit216e2cb36679abfcca869bed110b73e816ff9bf4 (patch)
tree1e60a90adce1588d26dc9f4c7d86f482c25777e7 /libpod/container_internal_linux.go
parentd0a44755c75763d2f5c656dca15b6bb928c961c4 (diff)
downloadpodman-216e2cb36679abfcca869bed110b73e816ff9bf4.tar.gz
podman-216e2cb36679abfcca869bed110b73e816ff9bf4.tar.bz2
podman-216e2cb36679abfcca869bed110b73e816ff9bf4.zip
Fix rootless networking with userns and ports
A rootless container created with a custom userns and forwarded ports did not work. I refactored the network setup to make the setup logic more clear. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 3187724ca..91453574e 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -108,15 +108,6 @@ func (c *Container) prepare() error {
c.state.NetNS = netNS
c.state.NetworkStatus = networkStatus
}
-
- // handle rootless network namespace setup
- if noNetNS && !c.config.PostConfigureNetNS {
- if rootless.IsRootless() {
- createNetNSErr = c.runtime.setupRootlessNetNS(c)
- } else if c.config.NetMode.IsSlirp4netns() {
- createNetNSErr = c.runtime.setupSlirp4netns(c)
- }
- }
}()
// Mount storage if not mounted
go func() {