[source] 6rd: add 6rd specific settings as nested json object

LEDE Commits lede-commits at lists.infradead.org
Mon May 22 12:40:49 PDT 2017


dedeckeh pushed a commit to source.git, branch master:
https://git.lede-project.org/c0a9a7339364c2baa6fb4a3d594b786591e05fb8

commit c0a9a7339364c2baa6fb4a3d594b786591e05fb8
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Thu May 18 11:34:44 2017 +0200

    6rd: add 6rd specific settings as nested json object
    
    Add 6rd specific settings prefix, relay-prefix as a nested data json object
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 package/network/ipv6/6rd/Makefile     | 2 +-
 package/network/ipv6/6rd/files/6rd.sh | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile
index 899c0f1..5086fae 100644
--- a/package/network/ipv6/6rd/Makefile
+++ b/package/network/ipv6/6rd/Makefile
@@ -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
diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh
index 62d35b6..8b34414 100644
--- a/package/network/ipv6/6rd/files/6rd.sh
+++ b/package/network/ipv6/6rd/files/6rd.sh
@@ -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



More information about the lede-commits mailing list