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  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:   Mon, 27 Jul 2020 09:30:27 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Julien Fortin <julien@...ulusnetworks.com>
Cc:     netdev@...r.kernel.org, roopa@...ulusnetworks.com,
        dsahern@...il.com
Subject: Re: [PATCH iproute2-next master v2] bridge: fdb show: fix fdb entry
 state output (+ add json support)

On Mon, 27 Jul 2020 18:20:09 +0200
Julien Fortin <julien@...ulusnetworks.com> wrote:

> diff --git a/bridge/fdb.c b/bridge/fdb.c
> index d1f8afbe..765f4e51 100644
> --- a/bridge/fdb.c
> +++ b/bridge/fdb.c
> @@ -62,7 +62,10 @@ static const char *state_n2a(unsigned int s)
>  	if (s & NUD_REACHABLE)
>  		return "";
>  
> -	sprintf(buf, "state=%#x", s);
> +	if (is_json_context())
> +		sprintf(buf, "%#x", s);
> +	else
> +		sprintf(buf, "state %#x", s)

Please keep the "state=%#x" for the non JSON case.
No need to change output format.

Powered by blists - more mailing lists