[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22938ec3-6a88-974f-db07-b1ecdc94392b@gmail.com>
Date: Wed, 15 May 2019 11:49:26 -0600
From: David Ahern <dsahern@...il.com>
To: Wei Wang <weiwan@...gle.com>
Cc: Wei Wang <tracywwnj@...il.com>, David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Martin KaFai Lau <kafai@...com>,
Mikael Magnusson <mikael.kernel@...ts.m7n.se>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] ipv6: fix src addr routing with the exception table
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 <dsahern@...il.com>
Powered by blists - more mailing lists