aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitd842fa622d22e1b23fbd86c91ba7b1ee2b2cfaec (patch)
tree07efb1e74de4c1da104ae601cee3155aed864414
parentcli: add multi-DNS to wg-quick (diff)
downloadwireguard-android-d842fa622d22e1b23fbd86c91ba7b1ee2b2cfaec.tar.xz
wireguard-android-d842fa622d22e1b23fbd86c91ba7b1ee2b2cfaec.zip
cli: only call DNS if there is DNS
-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 7720f34..4a1bce2 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() {