From: Stephen Hemminger <stephen@networkplumber.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: dsahern@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next] ip: error out if iplink does not consume all options
Date: Sun, 30 Jul 2023 09:27:27 -0700 [thread overview]
Message-ID: <20230730092727.5c4c64b5@hermes.local> (raw)
In-Reply-To: <20230728183329.2193688-1-kuba@kernel.org>
On Fri, 28 Jul 2023 11:33:29 -0700
Jakub Kicinski <kuba@kernel.org> wrote:
> dummy does not define .parse_opt, which make ip ignore all
> trailing arguments, for example:
>
> # ip link add type dummy a b c d e f name cheese
>
> will work just fine (and won't call the device "cheese").
> Error out in this case with a clear error message:
>
> # ip link add type dummy a b c d e f name cheese
> Garbage instead of arguments "a ...". Try "ip link help".
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Looks good, but then the latter check for lu->parse_opt in the if
clause is redundant. Coverity would flag that (assuming I get
Coverity running again on iproute).
prev parent reply other threads:[~2023-07-30 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 18:33 [PATCH iproute2-next] ip: error out if iplink does not consume all options Jakub Kicinski
2023-07-30 16:27 ` Stephen Hemminger [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=20230730092727.5c4c64b5@hermes.local \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=kuba@kernel.org \
--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