aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Walter <sahne@0x90.at>2011-04-13 17:09:25 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-15 18:43:55 -0400
commitbd015928bb1713691068c4d0d159afccbaf0f8c0 (patch)
tree816468bfbd16ba883175039853ced9a95d1f230f
parenteb8aa72d4e8756bde74d5f22bdd968ee6131069a (diff)
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 <dwalter@barracuda.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/ndisc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 92f952d093db..f057ff312840 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -945,9 +945,10 @@ static void ndisc_recv_na(struct sk_buff *skb)
945 } 945 }
946 ifp = ipv6_get_ifaddr(dev_net(dev), &msg->target, dev, 1); 946 ifp = ipv6_get_ifaddr(dev_net(dev), &msg->target, dev, 1);
947 if (ifp) { 947 if (ifp) {
948 if (ifp->flags & IFA_F_TENTATIVE) { 948 if (skb->pkt_type != PACKET_LOOPBACK
949 addrconf_dad_failure(ifp); 949 && (ifp->flags & IFA_F_TENTATIVE)) {
950 return; 950 addrconf_dad_failure(ifp);
951 return;
951 } 952 }
952 /* What should we make now? The advertisement 953 /* What should we make now? The advertisement
953 is invalid, but ndisc specs say nothing 954 is invalid, but ndisc specs say nothing