All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Timo Teräs" <timo.teras@iki.fi>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] ipv4: flush ARP entries on device change
Date: Wed, 03 Mar 2010 16:20:13 +0200	[thread overview]
Message-ID: <4B8E701D.7070300@iki.fi> (raw)
In-Reply-To: <4B8E6CC8.3080701@trash.net>

Patrick McHardy wrote:
> Timo Teras wrote:
>> If device flag IFF_NOARP is changed, we should flush the ARP cache as all
>> entries need to get refreshed.
>>
>> Signed-off-by: Timo Teras <timo.teras@iki.fi>
>> ---
>>  net/ipv4/arp.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
>> index c4dd135..036da92 100644
>> --- a/net/ipv4/arp.c
>> +++ b/net/ipv4/arp.c
>> @@ -1245,6 +1245,9 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event, vo
>>  		neigh_changeaddr(&arp_tbl, dev);
>>  		rt_cache_flush(dev_net(dev), 0);
>>  		break;
>> +	case NETDEV_CHANGE:
>> +		neigh_changeaddr(&arp_tbl, dev);
>> +		break;
> 
> It would be nice if we could restrict this to IFF_NOARP changes.

Yes. But I did not see any easy way to figure out which flags have changed.

Should we just keep a copy of the previous IFF_NOARP bit somewhere (where?).
Or did I miss something obvious?

- Timo

  reply	other threads:[~2010-03-03 14:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 14:01 [PATCH 1/2] gre: fix hard header destination address checking Timo Teras
2010-03-03 14:01 ` [PATCH 2/2] ipv4: flush ARP entries on device change Timo Teras
2010-03-03 14:06   ` Patrick McHardy
2010-03-03 14:20     ` Timo Teräs [this message]
2010-03-03 14:33       ` Patrick McHardy
2010-03-03 14:39         ` Timo Teräs
2010-03-03 14:44           ` Patrick McHardy
2010-03-04 11:15             ` Timo Teräs
2010-03-04  8:41 ` [PATCH 1/2] gre: fix hard header destination address checking 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=4B8E701D.7070300@iki.fi \
    --to=timo.teras@iki.fi \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.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.