From patchwork Wed Mar 3 14:01:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Teras X-Patchwork-Id: 46806 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C6F65B7CE6 for ; Thu, 4 Mar 2010 01:02:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754370Ab0CCOBz (ORCPT ); Wed, 3 Mar 2010 09:01:55 -0500 Received: from ey-out-2122.google.com ([74.125.78.27]:49505 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754361Ab0CCOBy (ORCPT ); Wed, 3 Mar 2010 09:01:54 -0500 Received: by ey-out-2122.google.com with SMTP id 25so244789eya.19 for ; Wed, 03 Mar 2010 06:01:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=HQ+i3/BTZdCGd2tjYy0VZABEcV4mb2wJTARakeAaGFA=; b=WKxCg4AaSXtUf/Cu8V7VBxCuCZjs4zYkY0BxskK9ERu7Z2He+aZffDM7JLMPZGD26G GMMur4ilLBIXv2eVjMXnI8nw5xfxLncURDcFKNgkDmQACJ9K+JKKbpwU/4kmDZXhMajY oOOWWN02eCLup10EYZZyczHjVGS9UO13sXGdw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Wbwk+iv+kKqX7dJnhNnL6iyF4rtIJkuSeSs8P3BcUAyysNA6vEyc9QNXIzoqYRyKpF nFTc0x14PRIUYnVxPvPVtidkA24lbEl9VWq1RTCk+NF45xd3lKnOcJcz6CEjOFijPqpY Rwjm41DFYjxWmmsealbeJRy/Ny6cYj38AORto= Received: by 10.213.102.195 with SMTP id h3mr2230302ebo.81.1267624912913; Wed, 03 Mar 2010 06:01:52 -0800 (PST) Received: from localhost.localdomain (letku109.adsl.netsonic.fi [194.29.195.109]) by mx.google.com with ESMTPS id 23sm16142926eya.34.2010.03.03.06.01.52 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 06:01:52 -0800 (PST) From: Timo Teras To: netdev@vger.kernel.org Cc: Timo Teras Subject: [PATCH 2/2] ipv4: flush ARP entries on device change Date: Wed, 3 Mar 2010 16:01:14 +0200 Message-Id: <1267624874-22326-2-git-send-email-timo.teras@iki.fi> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1267624874-22326-1-git-send-email-timo.teras@iki.fi> References: <1267624874-22326-1-git-send-email-timo.teras@iki.fi> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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; default: break; }