]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: set all.accept_dad to 0 by default
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 14 Nov 2017 13:21:32 +0000 (14:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Nov 2017 04:56:45 +0000 (13:56 +0900)
commit812baff5916670a1fb22cab3fb740d41003c2577
tree161c9a7e20ca78b6d622a58fc7f7b20393332fb3
parentc4cd55293cabe682da3f6990f06f00804a5d248a
ipv6: set all.accept_dad to 0 by default

With commits f22d65c8e7b9 and ea712c014aad, 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 ea712c014aad:
          global    per-interface    DAD enabled
[default]   1             1              yes
            X             0              no
            X             1              yes

- After f22d65c8e7b9 and ea712c014aad:
          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: f22d65c8e7b9 ("ipv6: fix net.ipv6.conf.all interface DAD handlers")
Fixes: ea712c014aad ("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>
Acked-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c