diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-02-23 15:16:15 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-04-01 17:27:03 +0200 |
commit | db19224b6dc35ac59062013256c73364eb024a99 (patch) | |
tree | 7296562ac1c05824206a17280e81023b7a961ea6 /libpod/networking_linux.go | |
parent | 8627de28bc685b6150db170ef373a9296ed09b03 (diff) | |
download | podman-db19224b6dc35ac59062013256c73364eb024a99.tar.gz podman-db19224b6dc35ac59062013256c73364eb024a99.tar.bz2 podman-db19224b6dc35ac59062013256c73364eb024a99.zip |
Only use rootless RLK when the container has ports
Do not invoke the rootlesskit port forwarder when the container has no
ports.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/networking_linux.go')
-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 |