From: Jakub Kicinski <kuba@kernel.org>
To: Florent Fourcot <florent.fourcot@wifirst.fr>
Cc: netdev@vger.kernel.org, Brian Baboch <brian.baboch@wifirst.fr>
Subject: Re: [PATCH net-next] rtnetlink: return ENODEV when ifname does not exist and group is given
Date: Fri, 1 Apr 2022 10:25:49 -0700 [thread overview]
Message-ID: <20220401102549.059ba70a@kernel.org> (raw)
In-Reply-To: <ba682166-956f-1eb7-1180-04b903234752@wifirst.fr>
On Fri, 1 Apr 2022 15:57:52 +0200 Florent Fourcot wrote:
> > Would it be slightly cleaner to have a similar check in
> > validate_linkmsg()? Something like:
> >
> > if (!dev && !ifm->ifi_index && tb[IFLA_GROUP] &&
> > (tb[IFLA_IFNAME] || tb[IFLA_ALT_IFNAME]))
>
>
> That will add some complexity in validate_linkmsg, since we will need to
> check NLM_F_CREATE flag before (it's probably not an error when
> NLM_F_CREATE is set), and to give ifm as argument to check ifi_index.
>
> I do not have a strong opinion on this topic, and if you think your idea
> is a better solution I can give a try in a v2.
Okay, fair. Please repost on Monday, tho, net-next is currently closed
(contrary to some status pages may be telling you...)
prev parent reply other threads:[~2022-04-01 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 12:35 [PATCH net-next] rtnetlink: return ENODEV when ifname does not exist and group is given Florent Fourcot
2022-04-01 3:36 ` Jakub Kicinski
2022-04-01 13:57 ` Florent Fourcot
2022-04-01 17:25 ` Jakub Kicinski [this message]
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=20220401102549.059ba70a@kernel.org \
--to=kuba@kernel.org \
--cc=brian.baboch@wifirst.fr \
--cc=florent.fourcot@wifirst.fr \
--cc=netdev@vger.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).