[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230730092727.5c4c64b5@hermes.local>
Date: Sun, 30 Jul 2023 09:27:27 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: dsahern@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next] ip: error out if iplink does not consume
all options
On Fri, 28 Jul 2023 11:33:29 -0700
Jakub Kicinski <kuba@...nel.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@...nel.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).
Powered by blists - more mailing lists