From: David Ahern <dsahern@kernel.org>
To: Petr Machata <petrm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>, Ido Schimmel <idosch@nvidia.com>,
Jacques de Laval <Jacques.De.Laval@westermo.com>
Subject: Re: [PATCH net-next 1/3] net: ipv4: Allow changing IPv4 address protocol
Date: Tue, 21 Mar 2023 20:28:33 -0600 [thread overview]
Message-ID: <43d833dd-2e1f-d225-bb56-6eed43243cb2@kernel.org> (raw)
In-Reply-To: <6ffecb0f77dc6e444e3a130a09b4fd5d717e6504.1679399108.git.petrm@nvidia.com>
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@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> ---
> net/ipv4/devinet.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2023-03-22 2:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 11:51 [PATCH net-next 0/3] net: Allow changing IPv4 address protocol Petr Machata
2023-03-21 11:51 ` [PATCH net-next 1/3] net: ipv4: " Petr Machata
2023-03-22 2:28 ` David Ahern [this message]
2023-03-21 11:52 ` [PATCH net-next 2/3] selftests: rtnetlink: Make the set of tests to run configurable Petr Machata
2023-03-21 11:52 ` [PATCH net-next 3/3] selftests: rtnetlink: Add an address proto test Petr Machata
2023-03-22 2:30 ` David Ahern
2023-03-23 8:40 ` [PATCH net-next 0/3] net: Allow changing IPv4 address protocol patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43d833dd-2e1f-d225-bb56-6eed43243cb2@kernel.org \
--to=dsahern@kernel.org \
--cc=Jacques.De.Laval@westermo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).