]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Don't call with rt6_uncached_list_flush_dev
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 12 Oct 2015 16:02:08 +0000 (11:02 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2015 11:52:40 +0000 (04:52 -0700)
commita540e2bc1f3f700a7824534a8cca1d28cf55b27b
tree1b867c769406705ec8b9b33e2dbfb0b8d5607e3c
parent0fef8766e479e0d57998680010cd9869801c7fa2
ipv6: Don't call with rt6_uncached_list_flush_dev

As originally written rt6_uncached_list_flush_dev makes no sense when
called with dev == NULL as it attempts to flush all uncached routes
regardless of network namespace when dev == NULL.  Which is simply
incorrect behavior.

Furthermore at the point rt6_ifdown is called with dev == NULL no more
network devices exist in the network namespace so even if the code in
rt6_uncached_list_flush_dev were to attempt something sensible it
would be meaningless.

Therefore remove support in rt6_uncached_list_flush_dev for handling
network devices where dev == NULL, and only call rt6_uncached_list_flush_dev
 when rt6_ifdown is called with a network device.

Fixes: dc609db510b1 ("ipv6: Keep track of DST_NOCACHE routes in case of iface down/unregister")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Reviewed-by: Martin KaFai Lau <kafai@fb.com>
Tested-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c