mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
openfortivpn: add realm parameter support
Some FortiGate VPN gateways require a specific authentication realm when multiple domains or user groups are configured on the same server. This commit updates the netifd protocol script to parse the 'realm' option from the UCI configuration and correctly append it to the openfortivpn command line arguments. Signed-off-by: Xing-Kai Wang <my@xkwang.org>
This commit is contained in:
committed by
Hannu Nyman
parent
a17068dc88
commit
e488e6c6a5
@@ -24,6 +24,7 @@ proto_openfortivpn_init_config() {
|
||||
proto_config_add_string "remote_status_check"
|
||||
proto_config_add_boolean "saml_login"
|
||||
proto_config_add_int "saml_login_port"
|
||||
proto_config_add_string "realm"
|
||||
no_device=1
|
||||
available=1
|
||||
}
|
||||
@@ -34,9 +35,9 @@ proto_openfortivpn_setup() {
|
||||
local msg ifname ip server_ips pwfile callfile
|
||||
|
||||
local peeraddr port tunlink local_ip username password persist_int \
|
||||
trusted_cert remote_status_check saml_login saml_login_port
|
||||
trusted_cert remote_status_check saml_login saml_login_port realm
|
||||
json_get_vars host peeraddr port tunlink local_ip username password persist_int \
|
||||
trusted_cert remote_status_check saml_login saml_login_port
|
||||
trusted_cert remote_status_check saml_login saml_login_port realm
|
||||
|
||||
ifname="vpn-$config"
|
||||
|
||||
@@ -148,6 +149,8 @@ proto_openfortivpn_setup() {
|
||||
fi
|
||||
}
|
||||
|
||||
[ -n "$realm" ] && append_args "--realm=$realm"
|
||||
|
||||
callfile="/var/etc/openfortivpn/peers/$config"
|
||||
echo "115200
|
||||
:$local_ip
|
||||
|
||||
Reference in New Issue
Block a user