vti: add vti specific settings as nested json object
[openwrt/staging/lynxis/omap.git] / package / network / config / vti / files / vti.sh
index 763fd4ee320ac6fea07cf9fac1037a6e8375e67e..0443800a0c8f06ee11a44bc719931f2295ccbf47 100755 (executable)
@@ -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