From 669e31e3ff631933b768dcca72e1336eb5b3bc2e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 28 Nov 2019 18:15:41 +0100 Subject: wg-quick: linux: have remove_iptables return true Reported-by: Thomas Sattler --- src/tools/wg-quick/linux.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/wg-quick/linux.bash') 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 } -- cgit v1.2.3-59-g8ed1b