aboutsummaryrefslogtreecommitdiffstats
path: root/tc/q_prio.c
diff options
context:
space:
mode:
Diffstat (limited to 'tc/q_prio.c')
-rw-r--r--tc/q_prio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tc/q_prio.c b/tc/q_prio.c
index c8c6477e1..a3781ffe8 100644
--- a/tc/q_prio.c
+++ b/tc/q_prio.c
@@ -101,6 +101,8 @@ int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (parse_rtattr_nested_compat(tb, TCA_PRIO_MAX, opt, qopt,
sizeof(*qopt)))
return -1;
+ if (qopt == NULL)
+ return -1; /* missing data from kernel */
print_uint(PRINT_ANY, "bands", "bands %u ", qopt->bands);
open_json_array(PRINT_ANY, "priomap");