[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba682166-956f-1eb7-1180-04b903234752@wifirst.fr>
Date: Fri, 1 Apr 2022 15:57:52 +0200
From: Florent Fourcot <florent.fourcot@...irst.fr>
To: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc: Brian Baboch <brian.baboch@...irst.fr>
Subject: Re: [PATCH net-next] rtnetlink: return ENODEV when ifname does not
exist and group is given
Hello,
> Please run the patches thru ./scripts/get_maintainer.pl.
> netdev is high volume (and Gmail hates it), we really need people
> to CC potential reviewers.
Sorry for that. I was unable to choose relevant reviewers in
get_maintainer output (too few or too many lines). I will add CC in next
post.
>
> 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.
Thanks,
--
Florent Fourcot
Powered by blists - more mailing lists