diff options
author | jim-p <jimp@pfsense.org> | 2011-03-09 14:49:35 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-03-09 14:49:35 -0500 |
commit | 28a581b83d5feb8dcfadf2551e83552ccd43ed13 (patch) | |
tree | a1cf3a63219c2e57ffe4442f4002d2495f16b6a3 | |
parent | a0140246b5bc2681bb7a748528e22a5b47f84461 (diff) | |
download | pfsense-28a581b83d5feb8dcfadf2551e83552ccd43ed13.zip pfsense-28a581b83d5feb8dcfadf2551e83552ccd43ed13.tar.gz |
Add {} around foreach contents. Fixes occasional duplication of the easyrule block alias.
-rw-r--r-- | etc/inc/easyrule.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc index 0daeb95..8ef72f4 100644 --- a/etc/inc/easyrule.inc +++ b/etc/inc/easyrule.inc @@ -79,11 +79,12 @@ function easyrule_block_rule_exists($int = 'wan') { } /* Search through the rules for one referencing our alias */ - foreach ($config['filter']['rule'] as $rule) + foreach ($config['filter']['rule'] as $rule) { if (!is_array($rule) || !is_array($rule['source'])) continue; if ($rule['source']['address'] == $blockaliasname . strtoupper($int) && ($rule['interface'] == $int)) return true; + } return false; } |