[PATCH 1/2] wg-quick: darwin: restore original dns settings on failed up

Loren McIntyre loren at mcint.io
Fri Jan 22 06:58:57 UTC 2021


---
 src/wg-quick/darwin.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash
index cde1b54..9c92f87 100755
--- a/src/wg-quick/darwin.bash
+++ b/src/wg-quick/darwin.bash
@@ -449,7 +449,7 @@ cmd_usage() {
 cmd_up() {
 	local i
 	get_real_interface && die "\`$INTERFACE' already exists as \`$REAL_INTERFACE'"
-	trap 'del_if; del_routes; exit' INT TERM EXIT
+	trap 'del_if; del_routes; del_dns; exit' INT TERM EXIT
 	execute_hooks "${PRE_UP[@]}"
 	add_if
 	set_config
-- 
2.29.2



More information about the WireGuard mailing list