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:   Mon, 31 Dec 2018 21:44:41 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     wenxu@...oud.cn
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 v3] iproute: Set ip/ip6 lwtunnel flags

On Fri, 21 Dec 2018 16:18:54 +0800
wenxu@...oud.cn wrote:

> +
> +	if (tb[LWTUNNEL_IP_FLAGS]) {
> +		flags = rta_getattr_u16(tb[LWTUNNEL_IP_FLAGS]);
> +		if (flags & TUNNEL_KEY)
> +			print_string(PRINT_ANY, NULL, "%s ", "key");
> +		if (flags & TUNNEL_CSUM)
> +			print_string(PRINT_ANY, NULL, "%s ", "csum");
> +		if (flags & TUNNEL_SEQ)
> +			print_string(PRINT_ANY, NULL, "%s ", "seq");
> +	}

I don't think this will generate valid JSON.  Please take output of ip link command
with your changes and the json format option and run it into python validator.
If the json is valid this will pretty print it. If not, it will give an error.

$ ip -j li  | python -m json.tool

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ