mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
openfortivpn: add persistent reconnect option
Currently when the connection times out, the interface will disconnect. Add capability to add persistent option to re-establish connectivity. Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
This commit is contained in:
committed by
Rosen Penev
parent
008d4afa5f
commit
bbf13f9d89
@@ -19,6 +19,7 @@ proto_openfortivpn_init_config() {
|
|||||||
proto_config_add_string "local_ip"
|
proto_config_add_string "local_ip"
|
||||||
proto_config_add_string "username"
|
proto_config_add_string "username"
|
||||||
proto_config_add_string "password"
|
proto_config_add_string "password"
|
||||||
|
proto_config_add_int "persist_int"
|
||||||
proto_config_add_string "trusted_cert"
|
proto_config_add_string "trusted_cert"
|
||||||
proto_config_add_string "remote_status_check"
|
proto_config_add_string "remote_status_check"
|
||||||
no_device=1
|
no_device=1
|
||||||
@@ -30,10 +31,10 @@ proto_openfortivpn_setup() {
|
|||||||
|
|
||||||
local msg ifname ip server_ips pwfile callfile
|
local msg ifname ip server_ips pwfile callfile
|
||||||
|
|
||||||
local peeraddr port tunlink local_ip username password trusted_cert \
|
local peeraddr port tunlink local_ip username password persist_int \
|
||||||
remote_status_check
|
trusted_cert remote_status_check
|
||||||
json_get_vars host peeraddr port tunlink local_ip username password trusted_cert \
|
json_get_vars host peeraddr port tunlink local_ip username password persist_int \
|
||||||
remote_status_check
|
trusted_cert remote_status_check
|
||||||
|
|
||||||
ifname="vpn-$config"
|
ifname="vpn-$config"
|
||||||
|
|
||||||
@@ -116,6 +117,7 @@ proto_openfortivpn_setup() {
|
|||||||
append_args "--ifname=$iface_device_name"
|
append_args "--ifname=$iface_device_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -n "$persist_int" ] && append_args "--persistent=$persist_int"
|
||||||
[ -n "$trusted_cert" ] && append_args "--trusted-cert=$trusted_cert"
|
[ -n "$trusted_cert" ] && append_args "--trusted-cert=$trusted_cert"
|
||||||
[ -n "$username" ] && append_args -u "$username"
|
[ -n "$username" ] && append_args -u "$username"
|
||||||
[ -n "$password" ] && {
|
[ -n "$password" ] && {
|
||||||
|
|||||||
Reference in New Issue
Block a user