aboutsummaryrefslogtreecommitdiffstatshomepage
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-11-28 18:15:41 +0100
commit2fc187eaeb3610044f3eca40e1f61f9339ebf99f (patch)
tree3b3fd95a22a548978fb26e0a8523749ca51a9137
parentwg-quick: linux: ensure postdown hooks execute (diff)
downloadWireGuard-2fc187eaeb3610044f3eca40e1f61f9339ebf99f.tar.xz
WireGuard-2fc187eaeb3610044f3eca40e1f61f9339ebf99f.zip
wg-quick: linux: have remove_iptables return true
Reported-by: Thomas Sattler <sattler@med.uni-frankfurt.de>
-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
}