diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-11-28 18:15:41 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:48:25 +0100 |
commit | 207aeed010c84d837b5c041f07df48e6edfd33e4 (patch) | |
tree | 0c0b964cae91dcef17df04e0594a4123de6551a1 /src/wg-quick | |
parent | wg-quick: linux: ensure postdown hooks execute (diff) | |
download | wireguard-tools-207aeed010c84d837b5c041f07df48e6edfd33e4.tar.xz wireguard-tools-207aeed010c84d837b5c041f07df48e6edfd33e4.zip |
wg-quick: linux: have remove_iptables return true
Reported-by: Thomas Sattler <sattler@med.uni-frankfurt.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rwxr-xr-x | src/wg-quick/linux.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash index dca7b3d..4fecabb 100755 --- a/src/wg-quick/linux.bash +++ b/src/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 } |