From 6e92c34f5c39d7af5fcd90b0e274ddf71a0083ce Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Fri, 22 Mar 2013 23:20:47 -0400 Subject: Fix preproc auto-rule disable to skip disabled rules. --- config/snort/snort.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/snort/snort.inc') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 6af50ffe..27d0b7e5 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -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"; -- cgit v1.2.3