Netdev List
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <fmancera@suse.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	horms@kernel.org, pabeni@redhat.com, edumazet@google.com,
	dsahern@kernel.org, davem@davemloft.net,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: Re: [PATCH 2/3 net-next v4] ipv4: handle devconf post-set actions on netlink updates
Date: Thu, 14 May 2026 11:16:33 +0200	[thread overview]
Message-ID: <c5ec2140-f0ba-4905-b40e-17ed943db38c@suse.de> (raw)
In-Reply-To: <20260513193039.7dd435df@kernel.org>

On 5/14/26 4:30 AM, Jakub Kicinski wrote:
> On Sun, 10 May 2026 10:15:27 +0200 Fernando Fernandez Mancera wrote:
>> -		nla_for_each_nested(a, tb[IFLA_INET_CONF], rem)
>> -			ipv4_devconf_set(in_dev, nla_type(a), nla_get_u32(a));
>> +		nla_for_each_nested(a, tb[IFLA_INET_CONF], rem) {
>> +			int old_value = ipv4_devconf_get(in_dev, nla_type(a));
>> +			int new_value = nla_get_u32(a);
> 
> Hm, what checks if nla_type(a) is in range?

That is handled at inet_validate_link_af(), see:

	if (tb[IFLA_INET_CONF]) {
		err = nla_parse_nested(nested_tb, IPV4_DEVCONF_MAX,
				       tb[IFLA_INET_CONF], inet_devconf_policy,
				       extack);

		if (err < 0)
			return err;
	}

(sorry if the formatting is messed up)

Thanks!
Fernando.

  reply	other threads:[~2026-05-14  9:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10  8:15 [PATCH 1/3 net-next v4] ipv4: centralize devconf sysctl handling Fernando Fernandez Mancera
2026-05-10  8:15 ` [PATCH 2/3 net-next v4] ipv4: handle devconf post-set actions on netlink updates Fernando Fernandez Mancera
2026-05-14  2:30   ` Jakub Kicinski
2026-05-14  9:16     ` Fernando Fernandez Mancera [this message]
2026-05-10  8:15 ` [PATCH 3/3 net-next v4] selftests: net: add test for IPv4 devconf netlink notifications Fernando Fernandez Mancera
2026-05-14  2:35   ` Jakub Kicinski
2026-05-14  9:42     ` Fernando Fernandez Mancera
2026-05-14 23:24       ` Jakub Kicinski
2026-05-15  8:02         ` Fernando Fernandez Mancera

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=c5ec2140-f0ba-4905-b40e-17ed943db38c@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=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --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