summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-14 13:41:39 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-14 13:59:10 +0100
commit473f28aa0db7b2701016b35d15d52c64d23bc841 (patch)
tree8795f6b215e254ffdf0ad1c2e721dffb0334cc91 /libpod
parentc8dea5f56e96f1a5b4b6564191176913d71bf4f3 (diff)
downloadpodman-473f28aa0db7b2701016b35d15d52c64d23bc841.tar.gz
podman-473f28aa0db7b2701016b35d15d52c64d23bc841.tar.bz2
podman-473f28aa0db7b2701016b35d15d52c64d23bc841.zip
slirp4netns: use --disable-host-loopback
Closes: https://github.com/containers/libpod/issues/2642 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/networking_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index b7f1c2f1b..809584804 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -162,9 +162,9 @@ func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) {
var cmd *exec.Cmd
if havePortMapping {
// if we need ports to be mapped from the host, create a API socket to use for communicating with slirp4netns.
- cmd = exec.Command(path, "--mtu", "65520", "-c", "-e", "3", "-r", "4", "--api-socket", apiSocket, fmt.Sprintf("%d", ctr.state.PID), "tap0")
+ cmd = exec.Command(path, "--disable-host-loopback", "--mtu", "65520", "-c", "-e", "3", "-r", "4", "--api-socket", apiSocket, fmt.Sprintf("%d", ctr.state.PID), "tap0")
} else {
- cmd = exec.Command(path, "--mtu", "65520", "-c", "-e", "3", "-r", "4", fmt.Sprintf("%d", ctr.state.PID), "tap0")
+ cmd = exec.Command(path, "--disable-host-loopback", "--mtu", "65520", "-c", "-e", "3", "-r", "4", fmt.Sprintf("%d", ctr.state.PID), "tap0")
}
cmd.SysProcAttr = &syscall.SysProcAttr{