Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Quentin Armitage <quentin@armitage.org.uk>
Cc: David Ahern <dsahern@kernel.org>, netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: parsing IFLA_INET_CONF broken since 7.1 if NLA_F_NESTED not set
Date: Tue, 15 Sep 2026 17:05:18 +0300	[thread overview]
Message-ID: <20260915140518.GA687229@shredder> (raw)
In-Reply-To: <24158a1c7c9d7fc28d42a0be53f3b9d1919caa1b.camel@armitage.org.uk>

On Mon, Sep 14, 2026 at 08:02:07PM +0100, Quentin Armitage wrote:
> Commit fa8fca88714c ("ipv4: validate IPV4_DEVCONF attributes properly") changed
> inet_validate_link_af() to call nla_parse_nested() rather than
> nla_for_each_nested() for IFLA_INET_CONF. A side effect of this change is that
> the code now checks that NLA_F_NESTED is set for IFLA_INET_CONF, and rejects the
> message if it is not, whereas previously there was no check for NLA_F_NESTED
> being set.
> 
> The consequence of this is that code which worked prior to Linux 7.1, albeit
> erroneously not setting NLA_F_NESTED now fails.
> 
> In order to maintain backward compatibility, rather than calling
> nla_parse_nested(), nla_parse() is called.
> 
> From 498a8cffcdbbc3265d2a4747ba5ded6f562af3a7 Mon Sep 17 00:00:00 2001
> From: Quentin Armitage <quentin@armitage.org.uk>
> Date: Mon, 14 Sep 2026 18:19:53 +0100
> Subject: [PATCH v2] net: allow IFLA_INET_CONF messages when NLA_F_NESTED unset
> 
> Commit fa8fca88714c ("ipv4: validate IPV4_DEVCONF attributes properly")
> added validation of IFLA_INET_CONF attributes, and in the process
> changed the call of nla_for_each_nested() to nla_parse_nested(). A
> side effect of this change is that the IFLA_INET_CONF option is now
> tested for NLA_F_NESTED being set, and fails if it is not. Prior to the
> commit there was no check of NLA_F_NESTED.
> 
> Change nla_parse_nested() to nla_parse(). This restores the previous
> functionality of not checking NLA_F_NESTED, thereby allowing code that
> (incorrectly) doesn't set NLA_F_NESTED to continue to work.
> 
> Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>

1. The code looks fine, but the patch is corrupted and cannot be
applied:

$ b4 shazam 24158a1c7c9d7fc28d42a0be53f3b9d1919caa1b.camel@armitage.org.uk
[...]
Applying: net: parsing IFLA_INET_CONF broken since 7.1 if NLA_F_NESTED not set
Patch failed at 0001 net: parsing IFLA_INET_CONF broken since 7.1 if NLA_F_NESTED not set
error: corrupt patch at /home/idosch/code/linux/.git/rebase-apply/patch:10

2. Missing a Fixes tag just above your SoB:

Fixes: fa8fca88714c ("ipv4: validate IPV4_DEVCONF attributes properly")

3. Since Jakub asked, please mention in the commit message that this
change broke keepalived.

4. See more info about how to correctly format a patch here:

https://docs.kernel.org/next/process/maintainer-netdev.html
https://docs.kernel.org/next/process/submitting-patches.html

  reply	other threads:[~2026-09-15 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 19:02 [PATCH v2] net: parsing IFLA_INET_CONF broken since 7.1 if NLA_F_NESTED not set Quentin Armitage
2026-09-15 14:05 ` Ido Schimmel [this message]
2026-09-15 21:33   ` [PATCH v3] net: allow IFLA_INET_CONF messages when NLA_F_NESTED unset Quentin Armitage
2026-09-16  7:05     ` Ido Schimmel
2026-09-19  1:30     ` 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=20260915140518.GA687229@shredder \
    --to=idosch@nvidia.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin@armitage.org.uk \
    /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