]> git.ipfire.org Git - thirdparty/iproute2.git/commit
q_cake: Fix incorrect printing of signed values in class statistics
authorToke Høiland-Jørgensen <toke@redhat.com>
Wed, 3 Mar 2021 12:30:18 +0000 (13:30 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 9 Mar 2021 03:05:19 +0000 (19:05 -0800)
commit60204c81e47dfdb1ef066c3cb2cfd0f3f19570df
tree420f6b74e530f5bae659bb5ad4821383b9c203d6
parent9f366536edb5158343152604e82b968be46dbf26
q_cake: Fix incorrect printing of signed values in class statistics

The deficit returned from the kernel is signed, but was printed with a %u
specifier in the format string, leading to negative values to be printed as
high unsigned values instead. In addition, we passed a negative value to
sprint_time() even though that expects an unsigned value. Fix this by
changing the format specifier and reversing the sign of negative time
values.

Fixes: 714444c0cb26 ("Add support for CAKE qdisc")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/q_cake.c