gre/tunnel: Print erspan_index using print_uint()

One is missing in JSON output because fprintf()
is used instead of print_uint().

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Serhey Popovych 2018-01-18 16:04:33 +02:00 committed by Stephen Hemminger
parent bad76e6b1f
commit 2a8d0f6e9c
2 changed files with 5 additions and 2 deletions

View File

@ -465,7 +465,8 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_GRE_ERSPAN_INDEX]) {
__u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
fprintf(f, "erspan_index %u ", erspan_idx);
print_uint(PRINT_ANY,
"erspan_index", "erspan_index %u ", erspan_idx);
}
tnl_print_encap(tb,

View File

@ -513,7 +513,9 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_GRE_ERSPAN_INDEX]) {
__u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
fprintf(f, "erspan_index %u ", erspan_idx);
print_uint(PRINT_ANY,
"erspan_index", "erspan_index %u ", erspan_idx);
}
tnl_print_encap(tb,