From 506d87101394ffe60f585d478bbdec7d2bc15e15 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 31 Jul 2017 22:26:00 +0200 Subject: [PATCH] cli: only call DNS if there is DNS Signed-off-by: Jason A. Donenfeld --- cli/wg-quick.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {