diff mbox series

[iproute2] erspan: fix JSON output

Message ID 20210406162802.9041-1-stephen@networkplumber.org (mailing list archive)
State Superseded
Delegated to: Stephen Hemminger
Headers show
Series [iproute2] erspan: fix JSON output | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Stephen Hemminger April 6, 2021, 4:28 p.m. UTC
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(-)

Comments

William Tu April 6, 2021, 4:40 p.m. UTC | #1
On Tue, Apr 6, 2021 at 9:28 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> 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>
> ---

LGTM, Thanks.
Acked-by: William Tu <u9012063@gmail.com>
diff mbox series

Patch

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]) {