From 216e2cb36679abfcca869bed110b73e816ff9bf4 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 8 Nov 2021 20:35:22 +0100 Subject: 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 --- libpod/container_internal_linux.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libpod/container_internal_linux.go') 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() { -- cgit v1.2.3-54-g00ecf