rootlessport: set source IP to slirp4netns device

set the source IP to the slirp4netns address instead of 127.0.0.1 when
using rootlesskit.

Closes: https://github.com/containers/podman/issues/5138

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2021-01-21 14:59:39 +01:00
parent 37319dec17
commit 5e65f0ba30
3 changed files with 22 additions and 4 deletions

View File

@ -547,6 +547,7 @@ func (r *Runtime) setupRootlessPortMappingViaRLK(ctr *Container, netnsPath strin
ExitFD: 3,
ReadyFD: 4,
TmpDir: ctr.runtime.config.Engine.TmpDir,
ChildIP: "10.0.2.100",
}
cfgJSON, err := json.Marshal(cfg)
if err != nil {