6rd: add 6rd specific settings as nested json object
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 18 May 2017 09:34:44 +0000 (11:34 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 22 May 2017 19:40:19 +0000 (21:40 +0200)
Add 6rd specific settings prefix, relay-prefix as a nested data json object

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/ipv6/6rd/Makefile
package/network/ipv6/6rd/files/6rd.sh

index 899c0f13f218454a47d1176fed3da86daa1f3d3e..5086fae69d29619a81c6604715ebf2c4af86eb72 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6rd
 PKG_VERSION:=9
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index 62d35b699466a6cad4123c8c130fcb7db2b944a6..8b34414280fbd0e020b15fc984155f0e42e5cd6e 100644 (file)
@@ -64,9 +64,13 @@ proto_6rd_setup() {
        json_add_int ttl "${ttl:-64}"
        [ -n "$tos" ] && json_add_string tos "$tos"
        json_add_string local "$ipaddr"
-       json_add_string 6rd-prefix "$ip6prefix/$ip6prefixlen"
-       json_add_string 6rd-relay-prefix "$ip4prefix/$ip4prefixlen"
        [ -n "$tunlink" ] && json_add_string link "$tunlink"
+
+       json_add_object 'data'
+       json_add_string prefix "$ip6prefix/$ip6prefixlen"
+       json_add_string relay-prefix "$ip4prefix/$ip4prefixlen"
+       json_close_object
+
        proto_close_tunnel
 
        proto_add_data