aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2013-09-29 10:24:10 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2013-09-29 10:24:10 -0400
commit89c3def559be6e37f05d8d1de546d18976da2d41 (patch)
tree7e0f603de3272f6a15770f7b4193a0629a843dca
parent83f0abac54106e178465d848e2009a66d1ba8735 (diff)
downloadpfsense-packages-89c3def559be6e37f05d8d1de546d18976da2d41.tar.gz
pfsense-packages-89c3def559be6e37f05d8d1de546d18976da2d41.tar.bz2
pfsense-packages-89c3def559be6e37f05d8d1de546d18976da2d41.zip
Backfit fix for adding to empty Supp List to Flowbits dialog
-rw-r--r--config/snort/snort_rules_flowbits.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/snort/snort_rules_flowbits.php b/config/snort/snort_rules_flowbits.php
index 7a653af8..499d093c 100644
--- a/config/snort/snort_rules_flowbits.php
+++ b/config/snort/snort_rules_flowbits.php
@@ -88,14 +88,15 @@ if ($_GET['act'] == "addsuppress" && is_numeric($_GET['sidid']) && is_numeric($_
if (empty($a_nat[$id]['suppresslistname']) || $a_nat[$id]['suppresslistname'] == 'default') {
$s_list = array();
- $s_list['name'] = $a_nat[$id]['interface'] . "suppress";
$s_list['uuid'] = uniqid();
- $s_list['descr'] = "Auto-generated list for alert suppression";
+ $s_list['name'] = $a_nat[$id]['interface'] . "suppress" . "_" . $s_list['uuid'];
+ $s_list['descr'] = "Auto-generated list for Alert suppression";
$s_list['suppresspassthru'] = base64_encode($suppress);
$a_suppress[] = $s_list;
$a_nat[$id]['suppresslistname'] = $s_list['name'];
$found_list = true;
} else {
+ /* If we get here, a Suppress List is defined for the interface so see if we can find it */
foreach ($a_suppress as $a_id => $alist) {
if ($alist['name'] == $a_nat[$id]['suppresslistname']) {
$found_list = true;
@@ -105,6 +106,10 @@ if ($_GET['act'] == "addsuppress" && is_numeric($_GET['sidid']) && is_numeric($_
$alist['suppresspassthru'] = base64_encode($tmplist);
$a_suppress[$a_id] = $alist;
}
+ else {
+ $alist['suppresspassthru'] = base64_encode($suppress);
+ $a_suppress[$a_id] = $alist;
+ }
}
}
}
@@ -112,7 +117,8 @@ if ($_GET['act'] == "addsuppress" && is_numeric($_GET['sidid']) && is_numeric($_
write_config();
$rebuild_rules = false;
sync_snort_package_config();
- $savemsg = gettext("Wrote suppress rule for 'gen_id {$_GET['gen_id']}, sig_id {$_GET['sidid']}' to the '{$a_nat[$id]['suppresslistname']}' Suppression List.");
+ snort_reload_config($a_nat[$id]);
+ $savemsg = gettext("An entry to suppress the Alert for 'gen_id {$_GET['gen_id']}, sig_id {$_GET['sidid']}' has been added to Suppress List '{$a_nat[$id]['suppresslistname']}'.");
}
else {
/* We did not find the defined list, so notify the user with an error */