|
|
7e752c |
From 3e679f946a6313983ca544a28ce0ccf0072962e5 Mon Sep 17 00:00:00 2001
|
|
|
7e752c |
From: Phil Sutter <psutter@redhat.com>
|
|
|
7e752c |
Date: Thu, 25 Oct 2018 12:22:23 +0200
|
|
|
7e752c |
Subject: [PATCH] tc: htb: Print default value in hex
|
|
|
7e752c |
|
|
|
7e752c |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1641053
|
|
|
7e752c |
Upstream Status: iproute2.git commit 737b8258b35f4
|
|
|
7e752c |
|
|
|
7e752c |
commit 737b8258b35f4cc643a8153fdf955bfa0adec30f
|
|
|
7e752c |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
7e752c |
Date: Tue Oct 23 12:36:24 2018 +0200
|
|
|
7e752c |
|
|
|
7e752c |
tc: htb: Print default value in hex
|
|
|
7e752c |
|
|
|
7e752c |
Value of 'default' is assumed to be hexadecimal when parsing, so
|
|
|
7e752c |
consequently it should be printed in hex as well. This is a regression
|
|
|
7e752c |
introduced when adding JSON output.
|
|
|
7e752c |
|
|
|
7e752c |
As requested, also change JSON output to print the value as hex string.
|
|
|
7e752c |
|
|
|
7e752c |
Fixes: f354fa6aa5ff0 ("tc: jsonify htb qdisc")
|
|
|
7e752c |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
7e752c |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
7e752c |
---
|
|
|
7e752c |
tc/q_htb.c | 2 +-
|
|
|
7e752c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7e752c |
|
|
|
7e752c |
diff --git a/tc/q_htb.c b/tc/q_htb.c
|
|
|
7e752c |
index b93d31d..cce9ebc 100644
|
|
|
7e752c |
--- a/tc/q_htb.c
|
|
|
7e752c |
+++ b/tc/q_htb.c
|
|
|
7e752c |
@@ -341,7 +341,7 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
|
|
|
7e752c |
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
|
|
|
7e752c |
|
|
|
7e752c |
print_int(PRINT_ANY, "r2q", "r2q %d", gopt->rate2quantum);
|
|
|
7e752c |
- print_uint(PRINT_ANY, "default", " default %u", gopt->defcls);
|
|
|
7e752c |
+ print_0xhex(PRINT_ANY, "default", " default %x", gopt->defcls);
|
|
|
7e752c |
print_uint(PRINT_ANY, "direct_packets_stat",
|
|
|
7e752c |
" direct_packets_stat %u", gopt->direct_pkts);
|
|
|
7e752c |
if (show_details) {
|
|
|
7e752c |
--
|
|
|
7e752c |
1.8.3.1
|
|
|
7e752c |
|