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

Nicolas Dichtel
2023-09-13T14:53:48Z

Le 13/09/2023 à 16:43, David Ahern a écrit :
> On 9/13/23 8:11 AM, Nicolas Dichtel wrote:
>> The compat_mode was introduced for daemons that doesn't support the nexthop
>> framework. There must be a notification (RTM_DELROUTE) when a route is deleted
>> due to a carrier down event. Right now, the backward compat is broken.
>
> The compat_mode is for daemons that do not understand the nexthop id
> attribute, and need the legacy set of attributes for the route - i.e,
Yes, it's my point.
On my system, one daemon understands and configures nexthop id and another one
doesn't understand nexthop id. This last daemon removes routes when an interface
is put down but not when the carrier is lost.
The kernel doc [1] says:
Further, updates or deletes of a nexthop configuration generate route
notifications for each fib entry using the nexthop.
So, my understanding is that a RTM_DELROUTE msg should be sent when a nexthop is
removed due to a carrier lost event.

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/ip-sysctl.rst#n2116

Regards,
Nicolas

> expand the nexthop information when sending messages to userspace.