wg-quick: check correct variable for route deduplication
Reported-by: John Sager <john@sager.me.uk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
ffcc09358e
commit
b2ec7892c8
|
@ -168,7 +168,7 @@ add_route() {
|
||||||
elif [[ $1 == */0 ]]; then
|
elif [[ $1 == */0 ]]; then
|
||||||
add_default "$1"
|
add_default "$1"
|
||||||
else
|
else
|
||||||
[[ $(ip route get "$i" 2>/dev/null) == *dev\ $INTERFACE\ * ]] || cmd ip route add "$1" dev "$INTERFACE"
|
[[ $(ip route get "$1" 2>/dev/null) == *dev\ $INTERFACE\ * ]] || cmd ip route add "$1" dev "$INTERFACE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue