[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <514C6CAA.2090902@cogentembedded.com>
Date: Fri, 22 Mar 2013 18:37:30 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: "Meng, Jilin" <Jilin.Meng@....com>
CC: "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>,
"Sun, Yinglin" <yinglin.sun@....com>,
"Prithviraj, Lakshmanan" <lakshmanan.prithviraj@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
Hello.
On 22-03-2013 7:20, Meng, Jilin wrote:
> 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-03-21 10:37:06.000000000 +0800
> @@ -757,6 +757,24 @@ static void ndisc_recv_ns(struct sk_buff
>
> if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
> if (dad) {
> + if (dev->type == ARPHRD_ETHER) {
> + const unsigned char *sadr;
Empty line after declaration wouldn't hurt.
> + sadr = skb_mac_header(skb);
> + if (sadr[6] == dev->dev_addr[0] &&
> + sadr[7] == dev->dev_addr[1] &&
> + sadr[8] == dev->dev_addr[2] &&
> + sadr[9] == dev->dev_addr[3] &&
> + sadr[10] == dev->dev_addr[4] &&
> + sadr[11] == dev->dev_addr[5]) {
Don't we have memcmp() in Linux?
WBR, Sergei
--
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