[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220217111251.30ab3eb5@hermes.local>
Date: Thu, 17 Feb 2022 11:12:51 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: dsahern@...il.com, gnault@...hat.com, netdev@...r.kernel.org
Subject: Re: [RFC iproute2] tos: interpret ToS in natural numeral system
On Wed, 16 Feb 2022 11:42:05 -0800
Jakub Kicinski <kuba@...nel.org> wrote:
> Silently forcing a base numeral system is very painful for users.
> ip currently interprets tos 10 as 0x10. Imagine user's bash script
> does:
>
> .. tos $((TOS * 2)) ..
>
> or any numerical operation on the ToS.
>
> This patch breaks existing scripts if they expect 10 to be 0x10.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> --
> I get the feeling this was discussed in the past.
>
> Also there's more:
> misc/lnstat_util.c: unsigned long f = strtoul(ptr, &ptr, 16);
This is reading /proc/net/stat/XXX files and those files
are generated in kernel without any prefix. So this has to stay.
Powered by blists - more mailing lists