summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-05 17:12:14 +0200
committerGitHub <noreply@github.com>2021-04-05 17:12:14 +0200
commit131458e956c74f7879223f278e8c3baf0ed925e9 (patch)
treeb8a01ba00deb71a892a3b98d7a36f87f3fa55dcc /libpod/container_internal_linux.go
parent1c8d3d0f6fb83b1e6c99dec759f4ae1c6b2e8f18 (diff)
parentd1e32dc6c6ccb24786cd095befcde761062442a0 (diff)
downloadpodman-131458e956c74f7879223f278e8c3baf0ed925e9.tar.gz
podman-131458e956c74f7879223f278e8c3baf0ed925e9.tar.bz2
podman-131458e956c74f7879223f278e8c3baf0ed925e9.zip
Merge pull request #9423 from Luap99/rootless-cni-no-infra
rootless cni without infra container
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index a136fb72d..d167bf188 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -92,11 +92,7 @@ func (c *Container) prepare() error {
// Set up network namespace if not already set up
noNetNS := c.state.NetNS == nil
if c.config.CreateNetNS && noNetNS && !c.config.PostConfigureNetNS {
- if rootless.IsRootless() && len(c.config.Networks) > 0 {
- netNS, networkStatus, createNetNSErr = AllocRootlessCNI(context.Background(), c)
- } else {
- netNS, networkStatus, createNetNSErr = c.runtime.createNetNS(c)
- }
+ netNS, networkStatus, createNetNSErr = c.runtime.createNetNS(c)
if createNetNSErr != nil {
return
}