Subject: Re: [PATCH 2/2] ipv4: flush ARP entries on device change

From: Patrick McHardy <[email-masked]>
Date: Wed, 03 Mar 2010 15:06:00 +0100

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 <[email-masked]>
> ---
>  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.