summaryrefslogtreecommitdiff
path: root/libpod/networking_slirp4netns.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-16 14:53:40 +0100
committerGitHub <noreply@github.com>2021-11-16 14:53:40 +0100
commit8430ffc72e74f1271174984674a1c2ee6118779e (patch)
treea3c0542f0f8b218a55172177ae1a3497043f90f4 /libpod/networking_slirp4netns.go
parentbe681ab5189dea3eef73082d0b494699072e66aa (diff)
parent295d87bb0b028e57dc2739791dee4820fe5fcc48 (diff)
downloadpodman-8430ffc72e74f1271174984674a1c2ee6118779e.tar.gz
podman-8430ffc72e74f1271174984674a1c2ee6118779e.tar.bz2
podman-8430ffc72e74f1271174984674a1c2ee6118779e.zip
Merge pull request #12283 from Luap99/machine-ports
podman machine improve port forwarding
Diffstat (limited to 'libpod/networking_slirp4netns.go')
-rw-r--r--libpod/networking_slirp4netns.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/networking_slirp4netns.go b/libpod/networking_slirp4netns.go
index 674075e23..67ea31c1c 100644
--- a/libpod/networking_slirp4netns.go
+++ b/libpod/networking_slirp4netns.go
@@ -509,7 +509,7 @@ func (r *Runtime) setupRootlessPortMappingViaRLK(ctr *Container, netnsPath strin
childIP := getRootlessPortChildIP(ctr, netStatus)
cfg := rootlessport.Config{
- Mappings: ctr.config.PortMappings,
+ Mappings: ctr.convertPortMappings(),
NetNSPath: netnsPath,
ExitFD: 3,
ReadyFD: 4,
@@ -594,7 +594,7 @@ func (r *Runtime) setupRootlessPortMappingViaSlirp(ctr *Container, cmd *exec.Cmd
// for each port we want to add we need to open a connection to the slirp4netns control socket
// and send the add_hostfwd command.
- for _, i := range ctr.config.PortMappings {
+ for _, i := range ctr.convertPortMappings() {
conn, err := net.Dial("unix", apiSocket)
if err != nil {
return errors.Wrapf(err, "cannot open connection to %s", apiSocket)