Skip to content

Commit bd01592

Browse files
sahnedavem330
authored andcommitted
ipv6: ignore looped-back NA while dad is running
[ipv6] Ignore looped-back NAs while in Duplicate Address Detection If we send an unsolicited NA shortly after bringing up an IPv6 address, the duplicate address detection algorithm fails and the ip stays in tentative mode forever. This is due a missing check if the NA is looped-back to us. Signed-off-by: Daniel Walter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eb8aa72 commit bd01592

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

net/ipv6/ndisc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,10 @@ static void ndisc_recv_na(struct sk_buff *skb)
945945
}
946946
ifp = ipv6_get_ifaddr(dev_net(dev), &msg->target, dev, 1);
947947
if (ifp) {
948-
if (ifp->flags & IFA_F_TENTATIVE) {
949-
addrconf_dad_failure(ifp);
950-
return;
948+
if (skb->pkt_type != PACKET_LOOPBACK
949+
&& (ifp->flags & IFA_F_TENTATIVE)) {
950+
addrconf_dad_failure(ifp);
951+
return;
951952
}
952953
/* What should we make now? The advertisement
953954
is invalid, but ndisc specs say nothing

0 commit comments

Comments
 (0)