summaryrefslogtreecommitdiffstatshomepage
path: root/contrib
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-12-20 19:14:19 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-12-23 21:09:23 +0100
commit4f6107f36011f9fe6e3fac04ce0edb62438356a4 (patch)
treea5a2b6eb6d5960f63f298fc65dfbfe1b480c4b7b /contrib
parentrouting-table: simplify and mask reparented root (diff)
downloadwireguard-monolithic-historical-4f6107f36011f9fe6e3fac04ce0edb62438356a4.tar.xz
wireguard-monolithic-historical-4f6107f36011f9fe6e3fac04ce0edb62438356a4.zip
tools: allowed-ips is easier to parse with spaces instead of ", "
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/examples/wg-config/wg-config2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/examples/wg-config/wg-config b/contrib/examples/wg-config/wg-config
index f2272b3..d7ea38c 100755
--- a/contrib/examples/wg-config/wg-config
+++ b/contrib/examples/wg-config/wg-config
@@ -129,7 +129,7 @@ cmd_add() {
done
up_if
if [[ $AUTO_ROUTE -eq 1 ]]; then
- for i in $(wg show "$INTERFACE" allowed-ips | grep -Po '(?<=[\t ])[0-9.:/a-z]+(?<=,)?' | sort -nr -k 2 -t /); do
+ for i in $(wg show "$INTERFACE" allowed-ips | grep -Po '(?<=[\t ])[0-9.:/a-z]+' | sort -nr -k 2 -t /); do
if ! add_default "$i" && [[ $(ip route get "$i") != *dev\ $INTERFACE\ * ]]; then
add_route "$i"
fi