netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Christian Pössinger" <christian@poessinger.com>
Cc: netdev@vger.kernel.org,
	Stephen Hemminger <stephen@networkplumber.org>,
	u9012063@gmail.com
Subject: [PATCH iproute2] erspan: fix JSON output
Date: Tue,  6 Apr 2021 09:28:02 -0700	[thread overview]
Message-ID: <20210406162802.9041-1-stephen@networkplumber.org> (raw)
In-Reply-To: <3ac544c09842410fb863b332917a03ad@poessinger.com>

The format for erspan output is not valid JSON.
The direction should be value and erspan_dir should be the key.

Fixes: 289763626721 ("erspan: add erspan version II support")
Cc: u9012063@gmail.com
Reported-by: Christian Pössinger <christian@poessinger.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/link_gre6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 9d270f4b4455..f33598af8989 100644
--- a/ip/link_gre6.c
+++ b/ip/link_gre6.c
@@ -594,10 +594,10 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 
 		if (erspan_dir == 0)
 			print_string(PRINT_ANY, "erspan_dir",
-				     "erspan_dir ingress ", NULL);
+				     "erspan_dir %s ", "ingress");
 		else
 			print_string(PRINT_ANY, "erspan_dir",
-				     "erspan_dir egress ", NULL);
+				     "erspan_dir %s ", "egress");
 	}
 
 	if (tb[IFLA_GRE_ERSPAN_HWID]) {
-- 
2.30.2


  reply	other threads:[~2021-04-06 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  8:07 iproute2 ERSPAN version 2 JSON output shows valueless key Christian Pössinger
2021-04-06 16:28 ` Stephen Hemminger [this message]
2021-04-06 16:40   ` [PATCH iproute2] erspan: fix JSON output William Tu
2021-04-09 10:49   ` [PATCH] erspan/erspan6: " Christian Poessinger
2021-04-12 16:35     ` William Tu
2021-04-07  9:03 [PATCH iproute2] erspan: " Christian Pössinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210406162802.9041-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=christian@poessinger.com \
    --cc=netdev@vger.kernel.org \
    --cc=u9012063@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).