mirror of
https://github.com/firehol/firehol.git
synced 2024-06-30 19:02:21 +00:00
Fix chain-exists logic in: with recent/knock/limit
Typo from switching to an associative array. We need to create the chain first time through, when the value is empty.
This commit is contained in:
parent
c9ed9c746f
commit
98855eaa30
@ -4634,7 +4634,7 @@ rule_action_param() {
|
||||
|
||||
# does the chain we need already exist?
|
||||
#if [ ! -f "${FIREHOL_CHAINS_DIR}/${accept_limit_chain}.${iptables_cmd}" ]
|
||||
if [ ! -z "${FIREHOL_CHAINS[${accept_limit_chain}.${iptables_cmd}]}" ]
|
||||
if [ -z "${FIREHOL_CHAINS[${accept_limit_chain}.${iptables_cmd}]}" ]
|
||||
then
|
||||
# the chain does not exist. create it.
|
||||
$iptables_cmd ${table} -N "${accept_limit_chain}"
|
||||
@ -4706,7 +4706,7 @@ rule_action_param() {
|
||||
|
||||
# does the chain we need already exist?
|
||||
#if [ ! -f "${FIREHOL_CHAINS_DIR}/${accept_recent_chain}.${iptables_cmd}" ]
|
||||
if [ ! -z "${FIREHOL_CHAINS[${accept_recent_chain}.${iptables_cmd}]}" ]
|
||||
if [ -z "${FIREHOL_CHAINS[${accept_recent_chain}.${iptables_cmd}]}" ]
|
||||
then
|
||||
# the chain does not exist. create it.
|
||||
$iptables_cmd ${table} -N "${accept_recent_chain}"
|
||||
@ -4744,7 +4744,7 @@ rule_action_param() {
|
||||
|
||||
# does the knock chain exists?
|
||||
#if [ ! -f "${FIREHOL_CHAINS_DIR}/${name}.${iptables_cmd}" ]
|
||||
if [ ! -z "${FIREHOL_CHAINS[${name}.${iptables_cmd}]}" ]
|
||||
if [ -z "${FIREHOL_CHAINS[${name}.${iptables_cmd}]}" ]
|
||||
then
|
||||
# the chain does not exist. create it.
|
||||
$iptables_cmd ${table} -N "${name}"
|
||||
|
Loading…
Reference in New Issue
Block a user