summaryrefslogtreecommitdiff
path: root/package/network
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-03-14 22:34:18 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-03-21 22:58:43 +0100
commit3a5bacdc7dfb0a34074f0ac93d9bc90e94ba2b71 (patch)
tree6efb3abe9b93362334603ecdff35c9f6532fee26 /package/network
parent13006712eab665d606d217fccbb8f609287e2c8b (diff)
downloadmtk-20170518-3a5bacdc7dfb0a34074f0ac93d9bc90e94ba2b71.zip
mtk-20170518-3a5bacdc7dfb0a34074f0ac93d9bc90e94ba2b71.tar.gz
mtk-20170518-3a5bacdc7dfb0a34074f0ac93d9bc90e94ba2b71.tar.bz2
gre: add gre specific settings as nested json object
Add gre specific settings ikey, okey, iseqno, oseqno, icsum and ocsum as a nested data json object Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/config/gre/Makefile2
-rwxr-xr-xpackage/network/config/gre/files/gre.sh11
2 files changed, 11 insertions, 2 deletions
diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile
index 90f92d4..9193f5c 100644
--- a/package/network/config/gre/Makefile
+++ b/package/network/config/gre/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gre
PKG_VERSION:=1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh
index cd327ea..a6b4ba8 100755
--- a/package/network/config/gre/files/gre.sh
+++ b/package/network/config/gre/files/gre.sh
@@ -31,7 +31,16 @@ gre_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},${icsum:-0},${ocsum:-0},${iseqno:-0},${oseqno:-0}"
+
+ json_add_object 'data'
+ [ -n "$ikey" ] && json_add_int ikey "$ikey"
+ [ -n "$okey" ] && json_add_int okey "$okey"
+ [ -n "$icsum" ] && json_add_boolean icsum "$icsum"
+ [ -n "$ocsum" ] && json_add_boolean ocsum "$ocsum"
+ [ -n "$iseqno" ] && json_add_boolean iseqno "$iseqno"
+ [ -n "$oseqno" ] && json_add_boolean oseqno "$oseqno"
+ json_close_object
+
proto_close_tunnel
proto_add_data