diff mbox series

[iproute2,3/3] link_iptnl: Open "encap" JSON object

Message ID 1514906959-9719-4-git-send-email-serhe.popovych@gmail.com
State Changes Requested, archived
Delegated to: stephen hemminger
Headers show
Series iptnl/tunnel: Open JSON section, kill code duplication and print iptnl mode | expand

Commit Message

Serhey Popovych Jan. 2, 2018, 3:29 p.m. UTC
It seems missing pair of open_json_object()/close_json_object()
in iptnl implementation.

Note that we open "encap" JSON object in ip6tnl.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
---
 ip/link_iptnl.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/ip/link_iptnl.c b/ip/link_iptnl.c
index afd1696..650f69b 100644
--- a/ip/link_iptnl.c
+++ b/ip/link_iptnl.c
@@ -498,6 +498,7 @@  static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[
 		__u16 sport = rta_getattr_u16(tb[IFLA_IPTUN_ENCAP_SPORT]);
 		__u16 dport = rta_getattr_u16(tb[IFLA_IPTUN_ENCAP_DPORT]);
 
+		open_json_object("encap");
 		print_string(PRINT_FP, NULL, "encap ", NULL);
 		switch (type) {
 		case TUNNEL_ENCAP_FOU: