From: Wei Wang <wei...@google.com>
Date: Wed, May 15, 2019 at 10:25 AM
To: David Ahern
Cc: Wei Wang, David Miller, Linux Kernel Network Developers, Martin
KaFai Lau, Mikael Magnusson, Eric Dumazet

> >
> > What about rt6_remove_exception_rt?
> >
> > You can add a 'cache' hook to ip/iproute.c to delete the cached routes
> > and verify that it works. I seem to have misplaced my patch to do it.
> I don't think rt6_remove_exception_rt() needs any change.
> It is because it gets the route cache rt6_info as the input parameter,
> not specific saddr or daddr from a flow or a packet.
> It is guaranteed that the hash used in the exception table is
> generated from rt6_info->rt6i_dst and rt6_info->rt6i_src.
>
> For the case where user tries to delete a cache route, ip6_route_del()
> calls rt6_find_cached_rt() to find the cached route first. And
> rt6_find_cached_rt() is taken care of to find the cached route
> according to both passed in src addr and f6i->fib6_src.
> So I think we are good here.
>
> From: David Ahern <dsah...@gmail.com>
> Date: Wed, May 15, 2019 at 9:38 AM
> To: Wei Wang, David Miller, <netdev@vger.kernel.org>
> Cc: Martin KaFai Lau, Wei Wang, Mikael Magnusson, Eric Dumazet
>
> > On 5/15/19 9:56 AM, David Ahern wrote:
> > > You can add a 'cache' hook to ip/iproute.c to delete the cached routes
> > > and verify that it works. I seem to have misplaced my patch to do it.
> >
> > found it.

Thanks. I patched it to iproute2 and tried it.
The route cache is removed by doing:
ip netns exec a ./ip -6 route del fd01::c from fd00::a cache

Reply via email to