From eaa64b198bf82ffe73e8a9a17ab047f21dd44866 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 12 Jun 2017 00:20:31 +0200 Subject: [PATCH] wg-quick: match ipv6 default route more broadly Signed-off-by: Jason A. Donenfeld --- src/wg-quick.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wg-quick.bash b/src/wg-quick.bash index 75050fd..012e41f 100755 --- a/src/wg-quick.bash +++ b/src/wg-quick.bash @@ -130,7 +130,7 @@ set_mtu() { } add_route() { - if [[ $1 == 0.0.0.0/0 || $1 == ::/0 ]]; then + if [[ $1 == 0.0.0.0/0 || $1 =~ ^[0:]+/0$ ]]; then add_default "$1" else cmd ip route add "$1" dev "$INTERFACE"