[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <027526AF93736D4380632CD4F3B42B80030B85@MX101CL02.corp.emc.com>
Date: Fri, 12 Apr 2013 07:45:54 +0000
From: "Meng, Jilin" <Jilin.Meng@....com>
To: "Meng, Jilin" <Jilin.Meng@....com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
"kaber@...sh.net" <kaber@...sh.net>
CC: "Sun, Yinglin" <yinglin.sun@....com>,
"Prithviraj, Lakshmanan" <lakshmanan.prithviraj@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
This version accepted David's comments of coding style, Eric's comments of ether_addr_equal_64bits(), and Hannes' comments of eth_hdr(), etc.
we should ignore the looped-back IPv6 DAD packet to avoid configuration failure.
This occurs when a bonding interface with roundrobin mode is being configured an IPv6 address while the switch side isn't configured bonding/channel yet.
Signed-off-by: Jilin Meng <jilin.meng@....com>
Signed-off-by: Yinglin Sun <yinglin.sun@....com>
Signed-off-by: Lakshmanan Prithviraj <lakshmanan.prithviraj@....com>
---
--- linux/net/ipv6/ndisc.c.orig 2013-03-12 17:16:18.000000000 +0800
+++ linux/net/ipv6/ndisc.c 2013-04-12 14:44:31.000000000 +0800
@@ -71,6 +71,7 @@
#include <linux/netfilter.h>
#include <linux/netfilter_ipv6.h>
+#include <linux/etherdevice.h>
/* Set to 3 to get tracing... */
#define ND_DEBUG 1
@@ -757,6 +758,16 @@ static void ndisc_recv_ns(struct sk_buff
if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
if (dad) {
+ /* To avoid the DAD looped-back to us.
+ * This occurs when a bonding interface with
+ * roundrobin mode is being configured while
+ * the switch side isn't configured yet.
+ */
+ if (dev->type == ARPHRD_ETHER &&
+ ether_addr_equal_64bits(
+ eth_hdr(skb)->h_source, dev->dev_addr))
+ goto out;
+
/*
* We are colliding with another node
* who is doing DAD
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists