]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg-quick: linux: suppress error when finding unused table
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 27 Nov 2019 16:12:08 +0000 (17:12 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 27 Nov 2019 16:12:15 +0000 (17:12 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick/linux.bash

index 0764dc6ec09c504a907504d36f0c1b392741c50a..81b1629d2af305450ee93ae420d02c094d4469dd 100755 (executable)
@@ -199,7 +199,7 @@ add_default() {
        local table proto i iptables
        if ! get_fwmark table; then
                table=51820
-               while [[ -n $(ip -4 route show table $table) || -n $(ip -6 route show table $table) ]]; do
+               while [[ -n $(ip -4 route show table $table 2>/dev/null) || -n $(ip -6 route show table $table 2>/dev/null) ]]; do
                        ((table++))
                done
                cmd wg set "$INTERFACE" fwmark $table