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@gmail.com>
This commit is contained in:
Hans Dedecker 2017-03-14 22:39:43 +01:00
parent 3a5bacdc7d
commit 071355dd5c
2 changed files with 7 additions and 2 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=vti PKG_NAME:=vti
PKG_VERSION:=1 PKG_VERSION:=1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View file

@ -26,7 +26,12 @@ vti_generic_setup() {
json_add_string local "$local" json_add_string local "$local"
json_add_string remote "$remote" json_add_string remote "$remote"
[ -n "$tunlink" ] && json_add_string link "$tunlink" [ -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_close_tunnel
proto_add_data proto_add_data