From: Simon Horman <simon.horman@corigine.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Thomas Graf <tgraf@infradead.org>,
Alexander Duyck <alexanderduyck@fb.com>
Subject: Re: [PATCH net 1/3] rtnetlink: move validate_linkmsg into rtnl_create_link
Date: Fri, 26 May 2023 12:40:18 +0200 [thread overview]
Message-ID: <ZHCMksmHg5nk0ULX@corigine.com> (raw)
In-Reply-To: <7fde1eac7583cc93bc5b1cb3b386c522b32a94c9.1685051273.git.lucien.xin@gmail.com>
On Thu, May 25, 2023 at 05:49:15PM -0400, Xin Long wrote:
> In commit 644c7eebbfd5 ("rtnetlink: validate attributes in do_setlink()"),
> it moved validate_linkmsg() from rtnl_setlink() to do_setlink(). However,
> as validate_linkmsg() is also called in __rtnl_newlink(), it caused
> validate_linkmsg() being called twice when running 'ip link set'.
>
> The validate_linkmsg() was introduced by commit 1840bb13c22f5b ("[RTNL]:
> Validate hardware and broadcast address attribute for RTM_NEWLINK") for
> existing links. After adding it in do_setlink(), there's no need to call
> it in __rtnl_newlink().
>
> Instead of deleting it from __rtnl_newlink(), this patch moves it to
> rtnl_create_link() to fix the missing validation for the new created
> links.
>
> Fixes: 644c7eebbfd5 ("rtnetlink: validate attributes in do_setlink()")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-05-26 10:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 21:49 [PATCH net 0/3] rtnetlink: a couple of fixes in linkmsg validation Xin Long
2023-05-25 21:49 ` [PATCH net 1/3] rtnetlink: move validate_linkmsg into rtnl_create_link Xin Long
2023-05-26 10:40 ` Simon Horman [this message]
2023-05-27 3:49 ` Jakub Kicinski
2023-05-27 20:36 ` Xin Long
2023-05-30 1:25 ` Jakub Kicinski
2023-05-25 21:49 ` [PATCH net 2/3] rtnetlink: move IFLA_GSO_ tb check to validate_linkmsg Xin Long
2023-05-26 10:40 ` Simon Horman
2023-05-25 21:49 ` [PATCH net 3/3] rtnetlink: add the missing IFLA_GRO_ tb check in validate_linkmsg Xin Long
2023-05-26 10:41 ` Simon Horman
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=ZHCMksmHg5nk0ULX@corigine.com \
--to=simon.horman@corigine.com \
--cc=alexanderduyck@fb.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tgraf@infradead.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).