public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail•com>
To: Stephen Hemminger <shemminger@vyatta•com>
Cc: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: Re: [PATCH] ipv4: arp_notify address list bug
Date: Tue, 06 Oct 2009 05:13:00 +0200	[thread overview]
Message-ID: <4ACAB5BC.1020307@gmail.com> (raw)
In-Reply-To: <20091005191505.75c929a6@nehalam>

Stephen Hemminger a écrit :
> This fixes a bug with arp_notify and also adds a small enhancement.
> 
> If arp_notify is enabled, kernel will crash if address is changed
> and no IP address is assigned.
>   http://bugzilla.kernel.org/show_bug.cgi?id=14330
> 
> The fix is to walk the (possibly empty) list when sending
> the gratuitous ARP's.

> 
> -				 NULL, dev->dev_addr, NULL);
> +		/* Send gratitious ARP to notify of link change */

	/* gratuitous */

> +		if (IN_DEV_ARP_NOTIFY(in_dev)) {
> +			struct in_ifaddr *ifa;
> +			for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next)
> +				arp_send(ARPOP_REQUEST, ETH_P_ARP,
> +					 ifa->ifa_address, dev,
> +					 ifa->ifa_address, NULL,
> +					 dev->dev_addr, NULL);
> +		}

This sends a broadcast storm if device has a long address list.

Maybe we should change arp_notify to an INTEGER to be able to give a limit.

If people used to set arp_notify to 1, they wont be surprised too much.

I suggest splitting patch in two parts, one to fix the bug for linux-2.6 and stable,
and another one for net-next-2.6 for the enhancement ?

Thanks


  reply	other threads:[~2009-10-06  3:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06  2:15 [PATCH] ipv4: arp_notify address list bug Stephen Hemminger
2009-10-06  3:13 ` Eric Dumazet [this message]
2009-10-06  4:31   ` David Miller
2009-10-06  5:20     ` Eric Dumazet
2009-10-06 15:29       ` Stephen Hemminger
2009-10-06 15:43         ` Eric Dumazet
2009-10-06 21:19           ` Mark Smith
2009-10-07 10:18       ` David Miller

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=4ACAB5BC.1020307@gmail.com \
    --to=eric.dumazet@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shemminger@vyatta$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox