[source] vti: add vti specific settings as nested json object

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 21 14:59:59 PDT 2017


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

commit 071355dd5c2e024659f0bc623f907c745dfc8837
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Tue Mar 14 22:39:43 2017 +0100

    vti: add vti specific settings as nested json object
    
    Add vti specific settings ikey and okey as a nested data json object
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 package/network/config/vti/Makefile     | 2 +-
 package/network/config/vti/files/vti.sh | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/network/config/vti/Makefile b/package/network/config/vti/Makefile
index bda2a9a..0a4657c 100644
--- a/package/network/config/vti/Makefile
+++ b/package/network/config/vti/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vti
 PKG_VERSION:=1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/vti/files/vti.sh b/package/network/config/vti/files/vti.sh
index 763fd4e..0443800 100755
--- a/package/network/config/vti/files/vti.sh
+++ b/package/network/config/vti/files/vti.sh
@@ -26,7 +26,12 @@ vti_generic_setup() {
 	json_add_string local "$local"
 	json_add_string remote "$remote"
 	[ -n "$tunlink" ] && json_add_string link "$tunlink"
-	json_add_string info "${ikey:-0},${okey:-0}"
+
+	json_add_object 'data'
+	[ -n "$ikey" ] && json_add_int ikey "$ikey"
+	[ -n "$okey" ] && json_add_int okey "$okey"
+	json_close_object
+
 	proto_close_tunnel
 
 	proto_add_data



More information about the lede-commits mailing list