From df0130c7f13051170f15d0c83f75600fc114dfef Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 25 Oct 2021 13:38:58 -0400 Subject: [PATCH] Default sysctl to "net.ipv6.conf.all.accept_dad=0" Fixes: https://github.com/containers/podman/issues/11062 Signed-off-by: Daniel J Walsh --- pkg/config/config_test.go | 5 +++++ pkg/config/containers.conf | 1 + 2 files changed, 6 insertions(+) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 79d014dde..dc9e4e7cc 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -22,6 +22,10 @@ var _ = Describe("Config", func() { It("should succeed with default config", func() { // Given // When + defaultSysctls := []string{ + "net.ipv4.ping_group_range=0 0", + "net.ipv6.conf.all.accept_dad=0", + } defaultConfig, err := NewConfig("") // Then @@ -32,6 +36,7 @@ var _ = Describe("Config", func() { path, err := defaultConfig.ImageCopyTmpDir() gomega.Expect(err).To(gomega.BeNil()) gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp")) + gomega.Expect(defaultConfig.Containers.DefaultSysctls).To(gomega.BeEquivalentTo(defaultSysctls)) }) It("should succeed with devices", func() { diff --git a/pkg/config/containers.conf b/pkg/config/containers.conf index 1d3c003e3..b15ccdbf1 100644 --- a/pkg/config/containers.conf +++ b/pkg/config/containers.conf @@ -65,6 +65,7 @@ default_capabilities = [ # default_sysctls = [ "net.ipv4.ping_group_range=0 0", + "net.ipv6.conf.all.accept_dad=0", ] # A list of ulimits to be set in containers by default, specified as