aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2022-05-31 08:36:33 +0100
committerRosen Penev <rosenp@gmail.com>2022-06-01 13:54:13 -0700
commit916fa87c335fd42ac5361f9518c06a609247abb3 (patch)
tree1ad6616f648701cd074a795dcd57995c47517338
parenta85bda72cce7ff638c2931e0f11e852995d84835 (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>
-rwxr-xr-xnet/openconnect/files/openconnect.sh12
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"