address comments

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
import this
2025-11-13 16:22:34 +00:00
committed by GitHub
parent cf8a399089
commit a38917cb9b
@@ -181,8 +181,8 @@ remove_duplicate_rules() {
rest=$(echo "$cleaned" | cut -d' ' -f2-)
# try exact delete first
if iptables -t filter -C "$chain" $rest 2>/dev/null; then
iptables -t filter -D "$chain" $rest && continue
if iptables -t filter -C "$chain" "$rest" 2>/dev/null; then
iptables -t filter -D "$chain" "$rest" && continue
fi
# fallback: find exact match textually in iptables -S