mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-04 23:05:29 +00:00
tc: htb: Print default value in hex
Value of 'default' is assumed to be hexadecimal when parsing, so
consequently it should be printed in hex as well. This is a regression
introduced when adding JSON output.
As requested, also change JSON output to print the value as hex string.
Fixes: f354fa6aa5
("tc: jsonify htb qdisc")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
6358bbc381
commit
737b8258b3
@ -332,7 +332,7 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
|
|||||||
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
|
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
|
||||||
|
|
||||||
print_int(PRINT_ANY, "r2q", "r2q %d", gopt->rate2quantum);
|
print_int(PRINT_ANY, "r2q", "r2q %d", gopt->rate2quantum);
|
||||||
print_uint(PRINT_ANY, "default", " default %u", gopt->defcls);
|
print_0xhex(PRINT_ANY, "default", " default %x", gopt->defcls);
|
||||||
print_uint(PRINT_ANY, "direct_packets_stat",
|
print_uint(PRINT_ANY, "direct_packets_stat",
|
||||||
" direct_packets_stat %u", gopt->direct_pkts);
|
" direct_packets_stat %u", gopt->direct_pkts);
|
||||||
if (show_details) {
|
if (show_details) {
|
||||||
|
Loading…
Reference in New Issue
Block a user