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]
Date:   Sun, 4 Dec 2022 17:52:57 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     <Daniel.Machon@...rochip.com>
Cc:     <netdev@...r.kernel.org>, <dsahern@...nel.org>, <petrm@...dia.com>,
        <maxime.chevallier@...tlin.com>, <vladimir.oltean@....com>,
        <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH iproute2-next v3 1/2] dcb: add new pcp-prio parameter to
 dcb app

On Sun, 4 Dec 2022 22:27:40 +0000
<Daniel.Machon@...rochip.com> wrote:

> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > On Fri, 2 Dec 2022 10:22:34 +0100
> > Daniel Machon <daniel.machon@...rochip.com> wrote:
> >   
> > > +static int dcb_app_print_key_pcp(__u16 protocol)
> > > +{
> > > +     /* Print in numerical form, if protocol value is out-of-range */
> > > +     if (protocol > DCB_APP_PCP_MAX) {
> > > +             fprintf(stderr, "Unknown PCP key: %d\n", protocol);
> > > +             return print_uint(PRINT_ANY, NULL, "%d:", protocol);
> > > +     }
> > > +
> > > +     return print_string(PRINT_ANY, NULL, "%s:", pcp_names[protocol]);
> > > +}  
> > 
> > This is not an application friendly way to produce JSON output.
> > You need to put a key on each one, and value should not contain colon.  
> 
> Hi Stephen,
> 
> Trying to understand your comment.
> 
> Are you talking about not producing any JSON output with the symbolic
> PCP values? eg. ["1de", 1] -> [8, 1]. So basically print with PRINT_FP
> in case of printing in JSON context?
> 
> /Daniel

What does output look like in json and non-json versions?
My concern that the json version would be awkward and have colons in it, but looks
like it won't.

For the unknown key type is printing error necessary? Maybe just show it in numeric form.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ