Re: [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib

David Ahern
2023-07-28T15:42:11Z

On 7/28/23 7:01 AM, Nicolas Dichtel wrote:
> Frankly, it's quite complex, there are corner cases.

yes there are.
>
> When an interface is set down, the routes associated to this interface should be
> removed. This is the simple part.
> But for ecmp routes, there are several cases:
> - if all nh use this interface: the routes are deleted by the kernel;
> - if only some nh uses this interface :
> + if all other nh already point to a down interface: the route are deleted by
> the kernel;
> + if at least one nh points to an up interface: the nh are temporarily disabled.
>
> Managing a cache with this is not so obvious 😉

FRR works well with Linux at this point, and libnl's caching was updated
ad fixed by folks from Cumulus Networks so it should be a good too.