All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: "Meng, Jilin" <Jilin.Meng@emc.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"kuznet@ms2.inr.ac.ru" <kuznet@ms2.inr.ac.ru>,
	"jmorris@namei.org" <jmorris@namei.org>,
	"yoshfuji@linux-ipv6.org" <yoshfuji@linux-ipv6.org>,
	"kaber@trash.net" <kaber@trash.net>,
	"Sun, Yinglin" <yinglin.sun@emc.com>,
	"Prithviraj, Lakshmanan" <lakshmanan.prithviraj@emc.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
Date: Thu, 11 Apr 2013 13:55:44 +0200	[thread overview]
Message-ID: <20130411115544.GA19782@order.stressinduktion.org> (raw)
In-Reply-To: <027526AF93736D4380632CD4F3B42B8002FE9D@MX101CL02.corp.emc.com>

On Thu, Apr 11, 2013 at 03:06:23AM +0000, 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.

I am very uncomfortable with this change in ndisc layer. I would
prefer DAD kicking in and disabling ipv6 on that interface in such a
situation. The likelihood that an interface with the same mac address
has the same ll ipv6 address is very high and DAD must guard that.

> Signed-off-by: Jilin Meng <jilin.meng@emc.com>
> Signed-off-by: Yinglin Sun <yinglin.sun@emc.com>
> Signed-off-by: Lakshmanan Prithviraj <lakshmanan.prithviraj@emc.com>
> ---
> --- linux/net/ipv6/ndisc.c.orig	2013-03-12 17:16:18.000000000 +0800
> +++ linux/net/ipv6/ndisc.c	2013-04-11 09:00:45.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,19 @@ 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;
> +					sadr = skb_mac_header(skb);
> +					if (ether_addr_equal_64bits(sadr + 6, dev->dev_addr))

Minor improvment:

struct ethhdr *eth = eth_hdr(skb);
if (ether_addr_equal_64bits(eth->h_source, dev->dev_addr))

  parent reply	other threads:[~2013-04-11 11:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11  3:06 [PATCH] net: Fix tentative IPv6 address due to DAD looping back Meng, Jilin
2013-04-11  3:14 ` David Miller
2013-04-12  7:40   ` Meng, Jilin
2013-04-11 11:55 ` Hannes Frederic Sowa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-04-11  1:31 Meng, Jilin
2013-03-22  3:20 Meng, Jilin
2013-03-22  3:39 ` YOSHIFUJI Hideaki
2013-04-11  3:11   ` Meng, Jilin
2013-03-22 14:37 ` Sergei Shtylyov
2013-03-22 14:47   ` Eric Dumazet
2013-04-11  3:13     ` Meng, Jilin
2013-04-11  3:16       ` David Miller
2013-04-12  7:45 ` Meng, Jilin
2013-04-12 17:15   ` David Miller
2013-04-12 17:51   ` Hannes Frederic Sowa
2013-04-12 20:03     ` Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130411115544.GA19782@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=Jilin.Meng@emc.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=lakshmanan.prithviraj@emc.com \
    --cc=netdev@vger.kernel.org \
    --cc=yinglin.sun@emc.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.