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>
This commit is contained in:
@@ -987,7 +987,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
|
||||
rt_cache_flush(dev_net(dev), 0);
|
||||
break;
|
||||
case NETDEV_UNREGISTER_BATCH:
|
||||
rt_cache_flush_batch();
|
||||
/* The batch unregister is only called on the first
|
||||
* device in the list of devices being unregistered.
|
||||
* Therefore we should not pass dev_net(dev) in here.
|
||||
*/
|
||||
rt_cache_flush_batch(NULL);
|
||||
break;
|
||||
}
|
||||
return NOTIFY_DONE;
|
||||
|
Reference in New Issue
Block a user