mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #2644 from giuseppe/slirp-disable-lo
slirp4netns: use --disable-host-loopback
This commit is contained in:
@ -162,9 +162,9 @@ func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) {
|
|||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if havePortMapping {
|
if havePortMapping {
|
||||||
// if we need ports to be mapped from the host, create a API socket to use for communicating with slirp4netns.
|
// 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 {
|
} 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{
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
|
Reference in New Issue
Block a user