[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 1 Jan 2019 09:33:23 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: wenxu@...oud.cn
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 v4] iproute: Set ip/ip6 lwtunnel flags
On Tue, 1 Jan 2019 21:27:15 +0800
wenxu@...oud.cn wrote:
> + if (flags & TUNNEL_KEY)
> + print_string(PRINT_ANY, "key", "%s ", "key");
> + if (flags & TUNNEL_CSUM)
> + print_string(PRINT_ANY, "csum", "%s ", "csum");
> + if (flags & TUNNEL_SEQ)
> + print_string(PRINT_ANY, "seq", "%s ", "seq");
Although this JSON syntax is correct, it does not follow the convention
used for other flags. It generates:
"key" : "key"
I think you should try:
if (flags & TUNNEL_KEY)
print_bool(PRINT_ANY, "key", "key ", true);
or
if (flags & TUNNEL_KEY)
print_null(PRINT_ANY, "key", "key ", NULL);
Powered by blists - more mailing lists