|
@@ -26,11 +26,12 @@ proto_openconnect_setup() {
|
26
|
26
|
json_get_vars server port username serverhash authgroup password password2 interface token_mode token_secret os csd_wrapper
|
27
|
27
|
|
28
|
28
|
grep -q tun /proc/modules || insmod tun
|
|
29
|
+ ifname="vpn-$config"
|
29
|
30
|
|
30
|
31
|
logger -t openconnect "initializing..."
|
31
|
32
|
serv_addr=
|
32
|
33
|
for ip in $(resolveip -t 10 "$server"); do
|
33
|
|
- ( proto_add_host_dependency "$config" "$ip" $interface )
|
|
34
|
+ ( proto_add_host_dependency "$interface" "$ip" "$ifname" )
|
34
|
35
|
serv_addr=1
|
35
|
36
|
done
|
36
|
37
|
[ -n "$serv_addr" ] || {
|
|
@@ -42,7 +43,7 @@ proto_openconnect_setup() {
|
42
|
43
|
|
43
|
44
|
[ -n "$port" ] && port=":$port"
|
44
|
45
|
|
45
|
|
- cmdline="$server$port -i vpn-$config --non-inter --syslog --script /lib/netifd/vpnc-script"
|
|
46
|
+ cmdline="$server$port -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script"
|
46
|
47
|
|
47
|
48
|
# migrate to standard config files
|
48
|
49
|
[ -f "/etc/config/openconnect-user-cert-vpn-$config.pem" ] && mv "/etc/config/openconnect-user-cert-vpn-$config.pem" "/etc/openconnect/user-cert-vpn-$config.pem"
|