aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/wg-quick/linux.bash
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-11-28 18:15:41 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-05 11:48:25 +0100
commit669e31e3ff631933b768dcca72e1336eb5b3bc2e (patch)
treef94052a69940bdf07a93f618170b6ec6e961f7b4 /src/tools/wg-quick/linux.bash
parentwg-quick: linux: ensure postdown hooks execute (diff)
downloadwireguard-monolithic-historical-669e31e3ff631933b768dcca72e1336eb5b3bc2e.tar.xz
wireguard-monolithic-historical-669e31e3ff631933b768dcca72e1336eb5b3bc2e.zip
wg-quick: linux: have remove_iptables return true
Reported-by: Thomas Sattler <sattler@med.uni-frankfurt.de>
Diffstat (limited to 'src/tools/wg-quick/linux.bash')
-rwxr-xr-xsrc/tools/wg-quick/linux.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
index dca7b3d..4fecabb 100755
--- a/src/tools/wg-quick/linux.bash
+++ b/src/tools/wg-quick/linux.bash
@@ -190,7 +190,7 @@ remove_iptables() {
[[ $line == "-A"* ]] && found=1
printf -v restore '%s\n%s' "$restore" "${line/#-A/-D}"
done < <($iptables-save)
- [[ $found -eq 1 ]] && echo "$restore" | cmd $iptables-restore -nw
+ [[ $found -ne 1 ]] || echo "$restore" | cmd $iptables-restore -nw
done
}