cli: only call DNS if there is DNS

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2017-07-31 22:26:00 +02:00 committed by Samuel Holland
parent b2f4a755a0
commit 506d871013

View File

@ -86,7 +86,7 @@ up_if() {
}
set_dns() {
cndc resolver setnetdns "$NETID" "" "${DNS[@]}"
[[ ${#DNS[@]} -eq 0 ]] || cndc resolver setnetdns "$NETID" "" "${DNS[@]}"
}
add_addr() {