Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] Fix wg-tool regex parsing for non en_US locale
@ 2017-02-05 16:22 Arti Zirk
  2017-02-05 22:00 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Arti Zirk @ 2017-02-05 16:22 UTC (permalink / raw)
  To: wireguard

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"
 
-- 
2.11.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix wg-tool regex parsing for non en_US locale
  2017-02-05 16:22 [PATCH] Fix wg-tool regex parsing for non en_US locale Arti Zirk
@ 2017-02-05 22:00 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2017-02-05 22:00 UTC (permalink / raw)
  To: Arti Zirk; +Cc: WireGuard mailing list

Thanks! Merged.

And good seeing you at the conf.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-05 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-05 16:22 [PATCH] Fix wg-tool regex parsing for non en_US locale Arti Zirk
2017-02-05 22:00 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).