From 2c6cabd73dfb23990c245250ef2e502bdb33d189 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 28 Feb 2019 19:03:11 +0100 Subject: [PATCH] wg-quick: freebsd: rebreak interface loopback, while fixing localhost The commit 7c833642 ("wg-quick: freebsd: allow loopback to work") was supposed to make things better, but actually it just started sending legitimate localhost traffic over the WireGuard interface, which is really quite bad. This reverts commit 7c833642dfa342218602ab18e7091e86408d2982. Reported-by: Matt Smith Signed-off-by: Jason A. Donenfeld --- src/wg-quick/freebsd.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wg-quick/freebsd.bash b/src/wg-quick/freebsd.bash index 93f1a3b..e83dbef 100755 --- a/src/wg-quick/freebsd.bash +++ b/src/wg-quick/freebsd.bash @@ -158,7 +158,7 @@ add_addr() { if [[ $1 == *:* ]]; then cmd ifconfig "$INTERFACE" inet6 "$1" alias else - cmd ifconfig "$INTERFACE" inet "$1" 127.0.0.1 alias + cmd ifconfig "$INTERFACE" inet "$1" "${1%%/*}" alias fi }