summaryrefslogtreecommitdiffhomepage
path: root/cli
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-31 22:26:00 +0200
committerSamuel Holland <samuel@sholland.org>2017-07-31 22:26:00 +0200
commit506d87101394ffe60f585d478bbdec7d2bc15e15 (patch)
tree07efb1e74de4c1da104ae601cee3155aed864414 /cli
parentb2f4a755a0edba81eede6e87577a80d5def7d27a (diff)
cli: only call DNS if there is DNS
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/wg-quick.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/wg-quick.bash b/cli/wg-quick.bash
index 7720f349..4a1bce29 100644
--- a/cli/wg-quick.bash
+++ b/cli/wg-quick.bash
@@ -86,7 +86,7 @@ up_if() {
}
set_dns() {
- cndc resolver setnetdns "$NETID" "" "${DNS[@]}"
+ [[ ${#DNS[@]} -eq 0 ]] || cndc resolver setnetdns "$NETID" "" "${DNS[@]}"
}
add_addr() {