From f3ffbb0b486661d4da840d3c791c8bc9e6c073e0 Mon Sep 17 00:00:00 2001 From: nser77 <104022475+nser77@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:24:20 +0200 Subject: [PATCH] Update tests_firewalls --- include/tests_firewalls | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/include/tests_firewalls b/include/tests_firewalls index 25f3dff3..f55f74e3 100644 --- a/include/tests_firewalls +++ b/include/tests_firewalls @@ -165,17 +165,19 @@ if [ ! "${SORTBINARY}" = "" ]; then eq="$( echo "${errqueue}" | ${SORTBINARY} -u )"; else eq="${errqueue}"; fi echo "${eq}" | while IFS="\n" read -r eql do - set -- ${eql} - while [ $# -gt 0 ] - do - LogText "Result: Found ${3} for ${2} (table: ${1})" - Display --indent 6 --text "- Checking chain ${2} (table: ${1}, target: ${3})" --result "${3}" --color "${4}" - if [ "${3}" = "NFQUEUE" ] - then - ReportSuggestion "${TEST_NO}" "Consider avoid ${3} target if possible (iptables chain ${2}, table: ${1})" - fi - shift 4 - done + if [ ! "$eql" = "" ] + then + set -- ${eql} + while [ $# -gt 0 ] + do + Display --indent 6 --text "- Checking chain ${2} (table: ${1}, target: ${3})" --result "${3}" --color "${4}" + if [ "${3}" = "NFQUEUE" ] + then + ReportSuggestion "${TEST_NO}" "Consider avoid ${3} target if possible (iptables chain ${2}, table: ${1})" + fi + shift 4 + done + fi done } done