From ead379a46457986eadf07273fedec378e87e515f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 17 Apr 2025 19:23:15 +0200 Subject: [PATCH] contrib/rootless-setuptool: Fix iptables detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix a logical error in the rootless setup tool where the iptables error handling was incorrectly placed. The code was setting `faced_iptables_error=1` even when iptables was available, causing unnecessary error messages and setup suggestions. This patch correctly moves the error handling into the `else` branch so that we only report iptables errors when the command is actually unavailable. Signed-off-by: Paweł Gronowski --- contrib/dockerd-rootless-setuptool.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/dockerd-rootless-setuptool.sh b/contrib/dockerd-rootless-setuptool.sh index 749b65b71b..c804a8cc88 100755 --- a/contrib/dockerd-rootless-setuptool.sh +++ b/contrib/dockerd-rootless-setuptool.sh @@ -152,6 +152,7 @@ init() { case $iptables_version in *legacy*) iptables_module="ip_tables" ;; esac + else faced_iptables_error=1 if [ -z "$OPT_SKIP_IPTABLES" ]; then if command -v apt-get > /dev/null 2>&1; then