aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_frontend.c4
-rw-r--r--net/ipv4/route.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 6c1e56aef1f4..3b373a8b0473 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -959,9 +959,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
959 break; 959 break;
960 case NETDEV_CHANGEMTU: 960 case NETDEV_CHANGEMTU:
961 case NETDEV_CHANGE: 961 case NETDEV_CHANGE:
962 case NETDEV_UNREGISTER_PERNET:
963 rt_cache_flush(dev_net(dev), 0); 962 rt_cache_flush(dev_net(dev), 0);
964 break; 963 break;
964 case NETDEV_UNREGISTER_BATCH:
965 rt_cache_flush_batch();
966 break;
965 } 967 }
966 return NOTIFY_DONE; 968 return NOTIFY_DONE;
967} 969}
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9889fbd96487..90cdcfc32937 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -900,6 +900,12 @@ void rt_cache_flush(struct net *net, int delay)
900 rt_do_flush(!in_softirq()); 900 rt_do_flush(!in_softirq());
901} 901}
902 902
903/* Flush previous cache invalidated entries from the cache */
904void rt_cache_flush_batch(void)
905{
906 rt_do_flush(!in_softirq());
907}
908
903/* 909/*
904 * We change rt_genid and let gc do the cleanup 910 * We change rt_genid and let gc do the cleanup
905 */ 911 */