ipv6: avoid dad-failures for addresses with NODAD
authorMahesh Bandewar <maheshb@google.com>
Sat, 13 May 2017 00:03:39 +0000 (17:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:50:06 +0000 (19:50 +0200)
commit2c88ce9a59982da0886f01133c80289037ffe4c6
tree1f6c4e29be206c78ae6bd105b369ded4818c7a20
parent9de3a3bfed892608dc30a6bc3fd8bdbeae5b51a5
ipv6: avoid dad-failures for addresses with NODAD

[ Upstream commit 66eb9f86e50547ec2a8ff7a75997066a74ef584b ]

Every address gets added with TENTATIVE flag even for the addresses with
IFA_F_NODAD flag and dad-work is scheduled for them. During this DAD process
we realize it's an address with NODAD and complete the process without
sending any probe. However the TENTATIVE flags stays on the
address for sometime enough to cause misinterpretation when we receive a NS.
While processing NS, if the address has TENTATIVE flag, we mark it DADFAILED
and endup with an address that was originally configured as NODAD with
DADFAILED.

We can't avoid scheduling dad_work for addresses with NODAD but we can
avoid adding TENTATIVE flag to avoid this racy situation.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/addrconf.c