Thread (8 messages) 8 messages, 5 authors, 2022-02-17

Re: [RFC iproute2] tos: interpret ToS in natural numeral system

flat view

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2022-02-17 19:12:58

On Wed, 16 Feb 2022 11:42:05 -0800
Jakub Kicinski [off-list ref] 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@kernel.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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help