From: Fernando Fernandez Mancera <fmancera@suse.de>
To: netdev@vger.kernel.org
Cc: horms@kernel.org, pabeni@redhat.com, kuba@kernel.org,
edumazet@google.com, dsahern@kernel.org, davem@davemloft.net
Subject: Re: [PATCH 2/2 net-next] ipv4: ipv4: handle devconf post-set actions on netlink updates
Date: Wed, 25 Mar 2026 21:39:05 +0100 [thread overview]
Message-ID: <9ba63bbe-1222-4b97-9698-a9c847b0a47b@suse.de> (raw)
In-Reply-To: <20260325161020.3516-2-fmancera@suse.de>
On 3/25/26 5:10 PM, Fernando Fernandez Mancera wrote:
> When IPv4 device configuration parameters are updated via netlink, the
> kernel currently only updates the value. This bypasses several
> post-modification actions that occur when these same parameters are
> updated via sysctl, such as flushing the routing cache or emitting
> RTM_NEWNETCONF notifications.
>
> This patch addresses the inconsistency by calling the
> devinet_conf_post_set() helper inside inet_set_link_af(). If a flush is
> required, we defer it until the netlink attribute parsing loop
> completes.
>
> This ensures consistent behavior and side-effects for devconf changes,
> regardless of whether they are initiated via sysctl or netlink.
>
> Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
> ---
> net/ipv4/devinet.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
[...]
> @@ -2507,6 +2521,10 @@ static bool devinet_conf_post_set(struct net *net, struct ipv4_devconf *cnf,
> return false;
>
> switch (attr) {
> + case IPV4_DEVCONF_FORWARDING:
> + if (new == 1)
> + return true;
> + break;
This is missing disabling LRO and also the proper netlink notification.
I will fix that on a V2. *facepalm* it does not matter how much I
reviewed this, I missed that detail, sorry.
> case IPV4_DEVCONF_ROUTE_LOCALNET:
> case IPV4_DEVCONF_ACCEPT_LOCAL:
> if (new == 0)
next prev parent reply other threads:[~2026-03-25 20:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 16:10 [PATCH 1/2 net-next] ipv4: centralize devconf sysctl handling Fernando Fernandez Mancera
2026-03-25 16:10 ` [PATCH 2/2 net-next] ipv4: ipv4: handle devconf post-set actions on netlink updates Fernando Fernandez Mancera
2026-03-25 20:39 ` Fernando Fernandez Mancera [this message]
2026-03-26 3:39 ` kernel test robot
2026-03-26 7:25 ` kernel test robot
2026-03-26 12:08 ` kernel test robot
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=9ba63bbe-1222-4b97-9698-a9c847b0a47b@suse.de \
--to=fmancera@suse.de \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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