summaryrefslogtreecommitdiffstats
path: root/net/ipv4/arp.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-05-28 01:30:23 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-28 13:11:02 -0700
commit6c8b4e3ff81b82fc153625e81e60af1d89de2c32 (patch)
tree88f8d3413e9fa93c9683ba2fef44167de2f583c9 /net/ipv4/arp.c
parentbe9efd3653284f2827fd82861e8e9db9a8f726e1 (diff)
downloadlinux-6c8b4e3ff81b82fc153625e81e60af1d89de2c32.tar.bz2
arp: flush arp cache on IFF_NOARP change
IFF_NOARP affects what kind of neighbor entries are created (nud NOARP or nud INCOMPLETE). If the flag changes, flush the arp cache to refresh all entries. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Jiri Pirko <jiri@resnulli.us> v2->v3: shortened notifier_info struct name Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r--net/ipv4/arp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index bf574029a183..4429b013f269 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1235,12 +1235,18 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event,
void *ptr)
{
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+ struct netdev_notifier_change_info *change_info;
switch (event) {
case NETDEV_CHANGEADDR:
neigh_changeaddr(&arp_tbl, dev);
rt_cache_flush(dev_net(dev));
break;
+ case NETDEV_CHANGE:
+ change_info = ptr;
+ if (change_info->flags_changed & IFF_NOARP)
+ neigh_changeaddr(&arp_tbl, dev);
+ break;
default:
break;
}