summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-03-17 18:54:47 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-03-17 18:59:55 +0100
commit1fd76c901f2c69cf74777e33e25033d70d9645a5 (patch)
treef6e85d6e865dcdf857069dd5509401fd1a7658b7 /libpod
parente59f71d230cf5435dc569add90e22cc644e38647 (diff)
downloadpodman-1fd76c901f2c69cf74777e33e25033d70d9645a5.tar.gz
podman-1fd76c901f2c69cf74777e33e25033d70d9645a5.tar.bz2
podman-1fd76c901f2c69cf74777e33e25033d70d9645a5.zip
podman machine: remove hostip from port
Inside the podman machine vm we always remove the hostip from the port mapping because this should only be used on the actual host. Otherwise you run into issues when we would bind 127.0.0.1 or try to bind a host address that is not available in the VM. This was already done for cni/netavark ports and slirp4netns but not for the port bindings inside libpod which are only used as root. [NO NEW TESTS NEEDED] We still do not have machine tests! Fixes #13543 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_conmon_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index a328f7621..72864b656 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -1199,7 +1199,7 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
cmd.ExtraFiles = append(cmd.ExtraFiles, childSyncPipe, childStartPipe)
if r.reservePorts && !rootless.IsRootless() && !ctr.config.NetMode.IsSlirp4netns() {
- ports, err := bindPorts(ctr.config.PortMappings)
+ ports, err := bindPorts(ctr.convertPortMappings())
if err != nil {
return 0, err
}