diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/networking_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index a5056d834..d927b17d8 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -436,7 +436,7 @@ func (r *Runtime) setupRootlessNetNS(ctr *Container) error { if err != nil { return err } - if len(networks) > 0 { + if len(networks) > 0 && len(ctr.config.PortMappings) > 0 { // set up port forwarder for CNI-in-slirp4netns netnsPath := ctr.state.NetNS.Path() // TODO: support slirp4netns port forwarder as well |