diff options
author | Rui Salvaterra <rsalvaterra@gmail.com> | 2022-05-31 08:36:33 +0100 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2022-06-01 13:54:13 -0700 |
commit | 916fa87c335fd42ac5361f9518c06a609247abb3 (patch) | |
tree | 1ad6616f648701cd074a795dcd57995c47517338 /net/openconnect/files | |
parent | a85bda72cce7ff638c2931e0f11e852995d84835 (diff) |
openconnect: make the host dependency optional
According to David Woodhouse, OpenConnect has no issues reconnecting on any
interface. Make the host dependency optional, as it can cause issues in multiple
WAN scenarios.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Diffstat (limited to 'net/openconnect/files')
-rwxr-xr-x | net/openconnect/files/openconnect.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index e80cf969e..6a7d12275 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -69,11 +69,13 @@ proto_openconnect_setup() { logger -t openconnect "initializing..." - logger -t "openconnect" "adding host dependency for $server at $config" - for ip in $(resolveip -t 10 "$server"); do - logger -t "openconnect" "adding host dependency for $ip at $config" - proto_add_host_dependency "$config" "$ip" "$interface" - done + [ -n "$interface" ] && { + logger -t "openconnect" "adding host dependency for $server at $config" + for ip in $(resolveip -t 10 "$server"); do + logger -t "openconnect" "adding host dependency for $ip at $config" + proto_add_host_dependency "$config" "$ip" "$interface" + done + } [ -n "$port" ] && port=":$port" |