summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-03-17 18:54:47 +0100
committerMatthew Heon <mheon@redhat.com>2022-03-30 14:11:14 -0400
commit5dce69bd9a6afa14a01de86d7ddac5ebb227643a (patch)
tree5de9d9dd25a2e2e85bfa8470d3232dab77e6be8b /libpod
parentd2b26ac8a01539dd3b729698955f4f064cd052d5 (diff)
downloadpodman-5dce69bd9a6afa14a01de86d7ddac5ebb227643a.tar.gz
podman-5dce69bd9a6afa14a01de86d7ddac5ebb227643a.tar.bz2
podman-5dce69bd9a6afa14a01de86d7ddac5ebb227643a.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
}