aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-12-20 00:11:20 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-20 13:37:19 -0500
commit6561a3b12d62ed5317e6ac32182d87a03f62c8dc (patch)
tree2b7318c3532a79dff8912ca4fdcd5d90aa0d8b39 /net/ipv4/fib_frontend.c
parent782615aea84e57dc7f2f922cea823df3de635a78 (diff)
ipv4: Flush per-ns routing cache more sanely.
Flush the routing cache only of entries that match the network namespace in which the purge event occurred. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index d3a1112b9d9..9f8bb68911e 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -987,7 +987,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
987 rt_cache_flush(dev_net(dev), 0); 987 rt_cache_flush(dev_net(dev), 0);
988 break; 988 break;
989 case NETDEV_UNREGISTER_BATCH: 989 case NETDEV_UNREGISTER_BATCH:
990 rt_cache_flush_batch(); 990 /* The batch unregister is only called on the first
991 * device in the list of devices being unregistered.
992 * Therefore we should not pass dev_net(dev) in here.
993 */
994 rt_cache_flush_batch(NULL);
991 break; 995 break;
992 } 996 }
993 return NOTIFY_DONE; 997 return NOTIFY_DONE;