[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e1811823-9675-79ce-3821-c3855b4f0eef@gmail.com>
Date: Sun, 25 Apr 2021 20:31:24 -0600
From: David Ahern <dsahern@...il.com>
To: Tony Ambardar <tony.ambardar@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>,
David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 v2] ip: drop 2-char command assumption
On 4/20/21 1:26 AM, Tony Ambardar wrote:
> The 'ip' utility hardcodes the assumption of being a 2-char command, where
> any follow-on characters are passed as an argument:
>
> $ ./ip-full help
> Object "-full" is unknown, try "ip help".
>
> This confusing behaviour isn't seen with 'tc' for example, and was added in
> a 2005 commit without documentation. It was noticed during testing of 'ip'
> variants built/packaged with different feature sets (e.g. w/o BPF support).
>
> Mitigate the problem by redoing the command without the 2-char assumption
> if the follow-on characters fail to parse as a valid command.
>
> Fixes: 351efcde4e62 ("Update header files to 2.6.14")
> Signed-off-by: Tony Ambardar <Tony.Ambardar@...il.com>
> ---
> v2: (feedback from David Ahern)
> * work around problem but remain compatible with 2-char assumption
>
> ---
> ip/ip.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
Applied. Thanks,
Powered by blists - more mailing lists