[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 21 Mar 2023 20:28:33 -0600
From: David Ahern <dsahern@...nel.org>
To: Petr Machata <petrm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: Shuah Khan <shuah@...nel.org>, Ido Schimmel <idosch@...dia.com>,
Jacques de Laval <Jacques.De.Laval@...termo.com>
Subject: Re: [PATCH net-next 1/3] net: ipv4: Allow changing IPv4 address
protocol
On 3/21/23 5:51 AM, Petr Machata wrote:
> When IP address protocol field was added in commit 47f0bd503210 ("net: Add
> new protocol attribute to IP addresses"), the semantics included the
> ability to change the protocol for IPv6 addresses, but not for IPv4
> addresses. It seems this was not deliberate, but rather by accident.
>
> A userspace that wants to change the protocol of an address might drop and
> recreate the address, but that disrupts routing and is just impractical.
>
> So in this patch, when an IPv4 address is replaced (through RTM_NEWADDR
> request with NLM_F_REPLACE flag), update the proto at the address to the
> one given in the request, or zero if none is given. This matches the
> behavior of IPv6. Previously, any new value given was simply ignored.
>
> Signed-off-by: Petr Machata <petrm@...dia.com>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>
> ---
> net/ipv4/devinet.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists