Re: [PATCH v2] net/ipv6: allow device-only routes via the multipath API
From: azey
Date: Thu Nov 27 2025 - 09:06:44 EST
On 2025-11-27 08:58:59 +0100 Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> wrote:
> I still think that there could be regressions because this commit changes the
> default behavior.
I don't think it should - my reasoning is that any routes created via
ip6_route_multipath_add() would always pass rt6_qualify_for_ecmp()
before this patch anyway:
- RAs get added as single routes via ip6_route_add(), so RTF_ADDRCONF
wouldn't be set
- f6i->nh wouldn't be set, since:
- ip6_route_info_create_nh() only sets nh if cfg->fc_nh_id is set,
otherwise sets fib6_nh
- rtm_to_fib6_config() prevents RTA_NH_ID and RTA_MULTIPATH from being
set at the same time, and only sets fc_nh_id if RTA_NH_ID is set
- f6i->fib6_nh->fib_nh_gw_family would always be set, as dev-only routes
were stopped by the check in rtm_to_fib6_multipath_config()
Did I get anything wrong? I should've probably included this in the commit
message, sorry.
> As stated for v1, having device-only multipath routes is already possible via
> the nexthop API.
I understand, however I still think it would be worth it to add this
to reconcile the v6/v4 APIs a bit better. If my reasoning is correct
and this doesn't cause regressions, it's a pretty trivial patch, and
FWIW as a user the feature would be very useful to me.