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>
This commit is contained in:
parent
13006712ea
commit
3a5bacdc7d
2 changed files with 11 additions and 2 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=gre
|
PKG_NAME:=gre
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=7
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
|
@ -31,7 +31,16 @@ gre_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},${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_close_tunnel
|
||||||
|
|
||||||
proto_add_data
|
proto_add_data
|
||||||
|
|
Loading…
Reference in a new issue