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

View file

@ -130,7 +130,7 @@ set_mtu() {
} }
add_route() { 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" add_default "$1"
else else
cmd ip route add "$1" dev "$INTERFACE" cmd ip route add "$1" dev "$INTERFACE"