From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Stefano Brivio <sbrivio@redhat.com>,
Matteo Croce <mcroce@redhat.com>, Erik Kline <ek@google.com>
Subject: [PATCH net v2] ipv6: set all.accept_dad to 0 by default
Date: Tue, 14 Nov 2017 14:21:32 +0100 [thread overview]
Message-ID: <20171114132132.25833-1-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <20171114032403.11ed517e@elisabeth>
With commits 35e015e1f577 and a2d3f3e33853, the global 'accept_dad' flag
is also taken into account (default value is 1). If either global or
per-interface flag is non-zero, DAD will be enabled on a given interface.
This is not backward compatible: before those patches, the user could
disable DAD just by setting the per-interface flag to 0. Now, the
user instead needs to set both flags to 0 to actually disable DAD.
Restore the previous behaviour by setting the default for the global
'accept_dad' flag to 0. This way, DAD is still enabled by default,
as per-interface flags are set to 1 on device creation, but setting
them to 0 is enough to disable DAD on a given interface.
- Before 35e015e1f57a7 and a2d3f3e33853:
global per-interface DAD enabled
[default] 1 1 yes
X 0 no
X 1 yes
- After 35e015e1f577 and a2d3f3e33853:
global per-interface DAD enabled
[default] 1 1 yes
0 0 no
0 1 yes
1 0 yes
- After this fix:
global per-interface DAD enabled
1 1 yes
0 0 no
[default] 0 1 yes
1 0 yes
Fixes: 35e015e1f577 ("ipv6: fix net.ipv6.conf.all interface DAD handlers")
Fixes: a2d3f3e33853 ("ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real")
CC: Stefano Brivio <sbrivio@redhat.com>
CC: Matteo Croce <mcroce@redhat.com>
CC: Erik Kline <ek@google.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v1 -> v2:
reword the commitlog
Stefano, I've kept both 'Fixes' lines because technically, the behavior has
changed with a2d3f3e33853, not with 35e015e1f577.
net/ipv6/addrconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8a1c846d3df9..ef5b61507b9a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -231,7 +231,7 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
.proxy_ndp = 0,
.accept_source_route = 0, /* we do not accept RH0 by default. */
.disable_ipv6 = 0,
- .accept_dad = 1,
+ .accept_dad = 0,
.suppress_frag_ndisc = 1,
.accept_ra_mtu = 1,
.stable_secret = {
--
2.15.0
next prev parent reply other threads:[~2017-11-14 13:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 13:45 [PATCH net] ipv6: set all.accept_dad to 0 by default Nicolas Dichtel
2017-11-13 14:21 ` Erik Kline
2017-11-13 14:28 ` Matteo Croce
2017-11-13 14:32 ` Stefano Brivio
2017-11-13 14:52 ` Maciej Żenczykowski
2017-11-13 15:05 ` Stefano Brivio
2017-11-13 16:09 ` Nicolas Dichtel
2017-11-14 2:42 ` Stefano Brivio
2017-11-14 2:24 ` Stefano Brivio
2017-11-14 9:43 ` Nicolas Dichtel
2017-11-14 13:21 ` Nicolas Dichtel [this message]
2017-11-14 13:53 ` [PATCH net v2] " Stefano Brivio
2017-11-14 18:30 ` Girish Moodalbail
2017-11-14 19:10 ` Stefano Brivio
2017-11-14 20:52 ` Girish Moodalbail
2017-11-15 10:17 ` Nicolas Dichtel
2017-11-15 10:25 ` David Miller
2017-11-15 10:49 ` Nicolas Dichtel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171114132132.25833-1-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=ek@google.com \
--cc=mcroce@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).