Permalink
Browse files

Merge pull request #412 from bmeeks8/master

Fix logic bug in preproc auto-rule-disable so it skips already disabled rules
  • Loading branch information...
2 parents 5c31da9 + 6e92c34 commit e9360d27f92fd405cb95d0d89c8d57e479e39421 Chris Buechler committed Mar 23, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 config/snort/snort.inc
View
@@ -1855,7 +1855,8 @@ function snort_filter_preproc_rules($snortcfg, &$active_rules) {
***************************************************/
foreach ($active_rules as $k1 => $rulem) {
foreach ($rulem as $k2 => $v) {
- if ($v['disabled'] == 0)
+ /* If rule is already disabled, skip it. */
+ if ($v['disabled'] == 1)
continue;
foreach ($rule_opts_preprocs as $opt => $preproc) {
$pcre = "/\s*\b" . $opt . "/i";

0 comments on commit e9360d2

Please sign in to comment.