[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba5f2eac-8151-4257-910b-e18b9716362b@kernel.org>
Date: Thu, 20 Mar 2025 08:20:27 -0600
From: David Ahern <dsahern@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 3/7] nexthop: Move NHA_OIF validation to
rtm_to_nh_config_rtnl().
On 3/19/25 5:06 PM, Kuniyuki Iwashima wrote:
> NHA_OIF needs to look up a device by __dev_get_by_index(),
> which requires RTNL.
>
> Let's move NHA_OIF validation to rtm_to_nh_config_rtnl().
>
> Note that the proceeding checks made the original !cfg->nh_fdb
> check redundant.
>
> NHA_FDB is set -> NHA_OIF cannot be set
> NHA_FDB is set but false -> NHA_OIF must be set
> NHA_FDB is not set -> NHA_OIF must be set
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> net/ipv4/nexthop.c | 43 +++++++++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 20 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists