On 5/15/19 11:45 AM, Wei Wang wrote: >> >> you have to pass in a device. The first line in ip6_del_cached_rt: >> >> if (cfg->fc_ifindex && rt->dst.dev->ifindex != cfg->fc_ifindex) >> goto out; >> >> 'ip route get' is one way to check if it has been deleted. We really >> need to add support for dumping exception routes. > > Without passing in dev, fc_ifindex = 0. So it won't goto out. Isn't it?
ugh, yes, blew right past that. > The way I checked if the route cache is being removed is by doing: > ip netns exec a cat /proc/net/rt6_stats > The 5th counter is the number of cached routes right now in the system. > > The output I get after I run the reproducer: > # ip netns exec a cat /proc/net/rt6_stats > 000b 0006 000e 0006 0001 0005 0000 > # ip netns exec a ./ip -6 route del fd01::c from fd00::/64 cache > # ip netns exec a cat /proc/net/rt6_stats > 000b 0006 0012 0006 0000 0004 0000 > > The same behavior if I pass in dev: > # ip netns exec a cat /proc/net/rt6_stats > 000b 0006 000c 0006 0001 0004 0000 > # ip netns exec a ./ip -6 route del fd01::c from fd00::/64 dev vethab cache > # ip netns exec a cat /proc/net/rt6_stats > 000b 0006 0013 0006 0000 0003 0000 > ok. Reviewed-by: David Ahern <dsah...@gmail.com>