[<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