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] [day] [month] [year] [list]
Date:   Thu, 14 Nov 2019 09:38:02 +0000
From:   Roi Dayan <roid@...lanox.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        David Ahern <dsahern@...il.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Eli Britstein <elibr@...lanox.com>
Subject: Re: [PATCH iproute2 1/5] tc_util: introduce a function to print
 JSON/non-JSON masked numbers



On 2019-11-13 7:20 PM, Stephen Hemminger wrote:
> On Wed, 13 Nov 2019 12:12:41 +0200
> Roi Dayan <roid@...lanox.com> wrote:
> 
>> +
>> +		if (is_json_context()) {
>> +			sprintf(namefrm, "\n  %s %%u", name);
>> +			print_hu(PRINT_ANY, name, namefrm,
>> +				 rta_getattr_type(attr));
>> +			if (mask != type_max) {
>> +				char mask_name[SPRINT_BSIZE-6];
>> +
>> +				sprintf(mask_name, "%s_mask", name);
>> +				sprintf(namefrm, "\n  %s %%u", mask_name);
>> +				print_hu(PRINT_ANY, mask_name, namefrm, mask);
> 
> Should use _SL_ to handle single line output format case (instead of \n)
> 

now i see there are more places using \n instead of _SL_ which breaks
oneline output. not related to this change so i'll prepare fixes for
those later.
thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ