wg-quick: match ipv6 default route more broadly

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2017-06-12 00:20:31 +02:00
parent 1b5234f3d5
commit eaa64b198b
1 changed files with 1 additions and 1 deletions

View File

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