erspan: fix JSON output
The format for erspan/erspan6 output is not valid JSON, as on version 2 a
valueless key was presented. The direction should be value and erspan_dir
should be the key.
Fixes: 2897636267 ("erspan: add erspan version II support")
Cc: u9012063@gmail.com
Reported-by: Christian Pössinger <christian@poessinger.com>
Signed-off-by: Christian Pössinger <christian@poessinger.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
e77a0d3dc9
commit
06d0bbf1ee
|
|
@ -536,10 +536,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]) {
|
||||
|
|
|
|||
|
|
@ -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]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue