From d847cf57d37ff64422b0cf7048b3c723e682822f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 25 Aug 2021 16:52:43 -0400 Subject: [PATCH] Enable ipv6 for rootless users by default Fixes containers/podman#10889 Inspired by @rugk Signed-off-by: Daniel J Walsh --- docs/containers.conf.5.md | 2 +- pkg/config/containers.conf | 2 +- pkg/config/default.go | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/containers.conf.5.md b/docs/containers.conf.5.md index 94ce77542..ba64c95a3 100644 --- a/docs/containers.conf.5.md +++ b/docs/containers.conf.5.md @@ -433,7 +433,7 @@ and pods are visible. Path to the slirp4netns binary. -**network_cmd_options**=[] +**network_cmd_options**=["enable_ipv6=true",] Default options to pass to the slirp4netns binary. diff --git a/pkg/config/containers.conf b/pkg/config/containers.conf index 0068a9a17..43c5bf1cf 100644 --- a/pkg/config/containers.conf +++ b/pkg/config/containers.conf @@ -407,7 +407,7 @@ default_sysctls = [ # Default options to pass to the slirp4netns binary. # For example "allow_host_loopback=true" # -#network_cmd_options = [] +#network_cmd_options = ["enable_ipv6=true",] # Whether to use chroot instead of pivot_root in the runtime # diff --git a/pkg/config/default.go b/pkg/config/default.go index 66531a2ba..67a759f35 100644 --- a/pkg/config/default.go +++ b/pkg/config/default.go @@ -257,7 +257,9 @@ func defaultConfigFromMemory() (*EngineConfig, error) { c.CgroupManager = defaultCgroupManager() c.StopTimeout = uint(10) - + c.NetworkCmdOptions = []string{ + "enable_ipv6=true", + } c.Remote = isRemote() c.OCIRuntimes = map[string][]string{ "crun": {