]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg-quick: darwin: sometimes there are no network services
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 17 May 2018 01:26:51 +0000 (03:26 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 17 May 2018 01:26:51 +0000 (03:26 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick/darwin.bash

index 581954c20c51a2c15686399eefd024db459ffe2c..dfdd54e06a885ddc08f8a7b56bad8be5b7a7be0d 100755 (executable)
@@ -236,10 +236,9 @@ set_endpoint_direct_route() {
 
 declare -A SERVICE_DNS
 collect_new_service_dns() {
-       # TODO: switch to scutil for all DNS modification
        local service get_response
        local -A found_services
-       { read -r _; while read -r service; do
+       { read -r _ && while read -r service; do
                [[ $service == "*"* ]] && service="${service:1}"
                found_services["$service"]=1
                [[ -n ${SERVICE_DNS["$service"]} ]] && continue