From d50d91892110a16731e759550f35ff4bcc1a6191 Mon Sep 17 00:00:00 2001 From: Brielle Date: Mon, 25 Apr 2016 10:40:45 -0600 Subject: [PATCH] Fix issue with erasing variables in postfw --- lib/iptables.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/iptables.inc b/lib/iptables.inc index 6151675..658b15c 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -588,10 +588,10 @@ function enable_portfw { ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} loading" if [ -e "${FWCONFIGDIR}/ipv${IPVER}/portfw.conf" ]; then ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} read ${FWCONFIGDIR}/ipv${IPVER}/portfw.conf successful" - use_conntrack="no" - ([[ ${IP_VERSION} == "ipv4" ]] && [[ ${Enablev4ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} NEW" - ([[ ${IP_VERSION} == "ipv6" ]] && [[ ${Enablev6ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} NEW" while read -r service protocol intip intport interface address srcaddress; do + use_conntrack="no" + ([[ ${IP_VERSION} == "ipv4" ]] && [[ ${Enablev4ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} NEW" + ([[ ${IP_VERSION} == "ipv6" ]] && [[ ${Enablev6ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} NEW" [[ ${service} = \#* ]] && continue [[ -z ${service} ]] && continue [[ ${service} == "-" ]] \