wg-quick: darwin: sometimes there are no network services

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-05-17 03:26:51 +02:00
parent fe9bc71e40
commit 0d9f30246d

View file

@ -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