lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMnS5yTW5X8uMw4Q2v-b7vGLaG019=GV_U0pC-7oyHSMnw@mail.gmail.com>
Date: Wed, 11 Feb 2026 11:33:25 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Deren Teo <deren.teo@...look.com>, 
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Victor Nogueira <victor@...atatu.com>
Subject: Re: [tc] Invalid JSON output from hfsc qdisc

On Sat, Feb 7, 2026 at 10:09 AM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Sat, Feb 07, 2026 at 02:01:01AM +0000, Deren Teo wrote:
> > Dear Jamal,
> >
> > I apologise if you have received this email twice. My first attempt mistakenly contained an HTML part and so was not delivered to the netdev mailing list. The original content follows.
> >
> >
> > The JSON output for the hfsc qdisc is not parseable when a default class is specified; `hfsc_print_opt` uses `fprintf` to print the default class.
> >
> >
> > Environment:
> >
> > - Fedora 42
> > - Linux 6.19.0-rc4+
> > - iproute-tc-6.12.0-3.fc42.x86_64
> >
> > Reproduce:
> >
> > 1. Add a hfsc qdisc with any default class. For example, from the tc-hfsc man page:
> >     # tc qdisc add dev eth0 root handle 1:0 hfsc default 1
> >
> > 2. Show the qdisc with the `-j` flag:
> >     # tc -j qdisc show dev eth0
> >
> > Actual results:
> >
> > [{"kind":"hfsc","handle":"1:","root":true,"refcnt":17,"options":{default 1 }}]
> >
> > Expected results:
> >
> > [{"kind":"hfsc","handle":"1:","root":true,"refcnt":17,"options":{"default":1}}]
>

Yeah, I do note that iproute2 lacks support for json output for hfsc
(and a couple of other qdiscs).
Should be a simple patch.

> Just an idea...
>
> Could the self tests in tools/testing/selftests/tc-testing/tc-tests be
> extended to dump the configuration in json and test the output is at
> least readable by the python json parser? That should catch simple
> formatting errors like this.
>

I believe the iproute2 folks already do this..

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ