From: Jason A. Donenfeld Date: Thu, 28 Nov 2019 17:15:41 +0000 (+0100) Subject: wg-quick: linux: have remove_iptables return true X-Git-Tag: v1.0.20191226~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=207aeed010c84d837b5c041f07df48e6edfd33e4;p=thirdparty%2Fwireguard-tools.git wg-quick: linux: have remove_iptables return true Reported-by: Thomas Sattler Signed-off-by: Jason A. Donenfeld --- 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 }