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>
This commit is contained in:
Jason A. Donenfeld 2019-11-28 18:15:41 +01:00
parent af69113e02
commit 207aeed010

View file

@ -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
}