Fix issue with erasing variables in service setup

master
Brie Bruns 2016-04-25 10:37:23 -06:00
parent f13c0fc66c
commit ddffbcd998
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,6 @@
2.1 Alpha 3 - 04/25.2016
- Fix issue with erasing variables in services setup
2.1 Alpha 2 - 03/15/2015 2.1 Alpha 2 - 03/15/2015
- Unset variables in loops to make sure theres no leakage of - Unset variables in loops to make sure theres no leakage of
variables into the next run of the loop variables into the next run of the loop

View File

@ -514,10 +514,10 @@ function enable_services {
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} loading" ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} loading"
if [ -e "${FWCONFIGDIR}/ipv${IPVER}/services.conf" ]; then if [ -e "${FWCONFIGDIR}/ipv${IPVER}/services.conf" ]; then
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} read ${FWCONFIGDIR}/ipv${IPVER}/services.conf successful" ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} read ${FWCONFIGDIR}/ipv${IPVER}/services.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 interface address srcaddress; do while read -r service protocol 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"
multiport="no" multiport="no"
[[ ${service} = \#* ]] && continue [[ ${service} = \#* ]] && continue
[[ -z ${service} ]] && continue [[ -z ${service} ]] && continue