aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/wg-quick/linux.bash
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-06 16:22:18 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-06 16:22:18 +0100
commit00c9308a71e4bfe1f0c26baef708861c2c9767f5 (patch)
treeb190dabb17794c4d9fb21ff4bb7a76df8936746e /src/tools/wg-quick/linux.bash
parentwg-quick: linux: some iptables don't like empty lines (diff)
downloadwireguard-monolithic-historical-00c9308a71e4bfe1f0c26baef708861c2c9767f5.tar.xz
wireguard-monolithic-historical-00c9308a71e4bfe1f0c26baef708861c2c9767f5.zip
wg-quick: linux: suppress more warnings on weird kernels
Diffstat (limited to 'src/tools/wg-quick/linux.bash')
-rwxr-xr-xsrc/tools/wg-quick/linux.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
index d2c2ba9..4e1f8ee 100755
--- a/src/tools/wg-quick/linux.bash
+++ b/src/tools/wg-quick/linux.bash
@@ -97,16 +97,16 @@ del_if() {
[[ $HAVE_SET_DNS -eq 0 ]] || unset_dns
[[ $HAVE_SET_IPTABLES -eq 0 ]] || remove_iptables
if [[ -z $TABLE || $TABLE == auto ]] && get_fwmark table && [[ $(wg show "$INTERFACE" allowed-ips) =~ /0(\ |$'\n'|$) ]]; then
- while [[ $(ip -4 rule show) == *"lookup $table"* ]]; do
+ while [[ $(ip -4 rule show 2>/dev/null) == *"lookup $table"* ]]; do
cmd ip -4 rule delete table $table
done
- while [[ $(ip -4 rule show) == *"from all lookup main suppress_prefixlength 0"* ]]; do
+ while [[ $(ip -4 rule show 2>/dev/null) == *"from all lookup main suppress_prefixlength 0"* ]]; do
cmd ip -4 rule delete table main suppress_prefixlength 0
done
- while [[ $(ip -6 rule show) == *"lookup $table"* ]]; do
+ while [[ $(ip -6 rule show 2>/dev/null) == *"lookup $table"* ]]; do
cmd ip -6 rule delete table $table
done
- while [[ $(ip -6 rule show) == *"from all lookup main suppress_prefixlength 0"* ]]; do
+ while [[ $(ip -6 rule show 2>/dev/null) == *"from all lookup main suppress_prefixlength 0"* ]]; do
cmd ip -6 rule delete table main suppress_prefixlength 0
done
fi