Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix logic bug in preproc auto-rule-disable so it skips already disabled rules #412

Merged
merged 1 commit into from over 1 year ago

2 participants

Bill Meeks Chris Buechler
Bill Meeks

Change Log

Date: 03/22/2013

  1. Fix logic bug in function that auto-disables rules containing rule options associated with disabled pre-processors. The logic was supposed to skip disabling already disabled rules, but instead was skipping enabled rules.
Chris Buechler cbuechler merged commit e9360d2 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 23, 2013
Bill Meeks bmeeks8 Fix preproc auto-rule disable to skip disabled rules. 6e92c34
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  config/snort/snort.inc
3  config/snort/snort.inc
@@ -1855,7 +1855,8 @@ function snort_filter_preproc_rules($snortcfg, &$active_rules) {
1855 1855 ***************************************************/
1856 1856 foreach ($active_rules as $k1 => $rulem) {
1857 1857 foreach ($rulem as $k2 => $v) {
1858   - if ($v['disabled'] == 0)
  1858 + /* If rule is already disabled, skip it. */
  1859 + if ($v['disabled'] == 1)
1859 1860 continue;
1860 1861 foreach ($rule_opts_preprocs as $opt => $preproc) {
1861 1862 $pcre = "/\s*\b" . $opt . "/i";

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.