[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c382acc-d823-47e9-902d-42606d64daf1@redhat.com>
Date: Wed, 16 Apr 2025 11:06:30 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
"David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH RESEND v2 net-next 04/14] ipv6: Check GATEWAY in
rtm_to_fib6_multipath_config().
On 4/14/25 8:14 PM, Kuniyuki Iwashima wrote:
> In ip6_route_multipath_add(), we call rt6_qualify_for_ecmp() for each
> entry. If it returns false, the request fails.
>
> rt6_qualify_for_ecmp() returns false if either of the conditions below
> is true:
>
> 1. f6i->fib6_flags has RTF_ADDRCONF
> 2. f6i->nh is not NULL
> 3. f6i->fib6_nh->fib_nh_gw_family is AF_UNSPEC
>
> 1 is unnecessary because rtm_to_fib6_config() never sets RTF_ADDRCONF
> to cfg->fc_flags.
>
> 2. is equivalent with cfg->fc_nh_id.
>
> 3. can be replaced by checking RTF_GATEWAY in the base and each multipath
> entry because AF_INET6 is set to f6i->fib6_nh->fib_nh_gw_family only when
> cfg.fc_is_fdb is true or RTF_GATEWAY is set, but the former is always
> false.
>
> Let's perform the equivalent checks in rtm_to_fib6_multipath_config().
It's unclear to me the 'why'???
Thanks,
Paolo
Powered by blists - more mailing lists