Skip to content

Commit a2d3f3e

Browse files
teknoraverdavem330
authored andcommitted
ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real
Commit 35e015e ("ipv6: fix net.ipv6.conf.all interface DAD handlers") was intended to affect accept_dad flag handling in such a way that DAD operation and mode on a given interface would be selected according to the maximum value of conf/{all,interface}/accept_dad. However, addrconf_dad_begin() checks for particular cases in which we need to skip DAD, and this check was modified in the wrong way. Namely, it was modified so that, if the accept_dad flag is 0 for the given interface *or* for all interfaces, DAD would be skipped. We have instead to skip DAD if accept_dad is 0 for the given interface *and* for all interfaces. Fixes: 35e015e ("ipv6: fix net.ipv6.conf.all interface DAD handlers") Acked-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Matteo Croce <mcroce@redhat.com> Reported-by: Erik Kline <ek@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6151b8b commit a2d3f3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv6/addrconf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3820,8 +3820,8 @@ static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
38203820
goto out;
38213821

38223822
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
3823-
dev_net(dev)->ipv6.devconf_all->accept_dad < 1 ||
3824-
idev->cnf.accept_dad < 1 ||
3823+
(dev_net(dev)->ipv6.devconf_all->accept_dad < 1 &&
3824+
idev->cnf.accept_dad < 1) ||
38253825
!(ifp->flags&IFA_F_TENTATIVE) ||
38263826
ifp->flags & IFA_F_NODAD) {
38273827
bump_id = ifp->flags & IFA_F_TENTATIVE;

0 commit comments

Comments
 (0)