[PATCH] Fix wg-tool regex parsing for non en_US locale

Arti Zirk arti.zirk at gmail.com
Sun Feb 5 17:22:33 CET 2017

On systems that have the default locale set to anything other than en_US
or C will be unable to use wg-quick because regex rules use to make sure
that the input interface name is a valid will fail. Forcing locale
inside the script to C seems to fix that.
 src/tools/wg-quick.bash | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash
index 5db3485..c4f0cfd 100755
--- a/src/tools/wg-quick.bash
+++ b/src/tools/wg-quick.bash
@@ -6,6 +6,9 @@
 set -e -o pipefail
 shopt -s extglob
+# regex will change behavior based on the current locale, so lets set it to somehting that should work on most systems
+export LANG=C
 SELF="$(readlink -f "${BASH_SOURCE[0]}")"
 export PATH="${SELF%/*}:$PATH"

More information about the WireGuard mailing list