aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort_build.inc
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2011-06-25 08:41:45 -0700
committerrobiscool <robrob2626@yahoo.com>2011-06-25 08:41:45 -0700
commit29f7aa59851de73ad4bc6e08589448895ce11dba (patch)
tree128e817a49bf6ce3ce6497d5aeac906551dcd1f3 /config/snort-dev/snort_build.inc
parenteb63ff52f60d7fda2b71bf6319849604e38802e2 (diff)
downloadpfsense-packages-29f7aa59851de73ad4bc6e08589448895ce11dba.tar.gz
pfsense-packages-29f7aa59851de73ad4bc6e08589448895ce11dba.tar.bz2
pfsense-packages-29f7aa59851de73ad4bc6e08589448895ce11dba.zip
snort-dev, update modal, begin update gui work
Diffstat (limited to 'config/snort-dev/snort_build.inc')
-rw-r--r--config/snort-dev/snort_build.inc18
1 files changed, 12 insertions, 6 deletions
diff --git a/config/snort-dev/snort_build.inc b/config/snort-dev/snort_build.inc
index 7ce92f2a..29695df4 100644
--- a/config/snort-dev/snort_build.inc
+++ b/config/snort-dev/snort_build.inc
@@ -43,7 +43,6 @@ if(isset($_POST['__csrf_magic'])) {
unset($_POST['__csrf_magic']);
}
-
// -------------------------- START snort.conf -------------------------
/* func builds custom whitelests */
@@ -133,7 +132,7 @@ function build_base_whitelist($lanip, $wanip, $wangw, $wandns, $vips, $vpns, $us
$vpns_list = filter_get_vpns_list();
}
- if ($vpns_list != '') {
+ if (!empty($vpns_list)) {
$home_net .= "$vpns_list ";
}
}
@@ -194,7 +193,7 @@ function create_snort_homenet($snortNet, $getSnortHomeNet) {
$listName = $getSnortHomeNet['homelistname'];
- if ($listName == 'default' || $listName == '') {
+ if ($listName == 'default' || empty($listName)) {
return build_base_whitelist('on','on', 'on', 'on', 'on', 'on', 'off', '');
}else{
$getSnortWhitelist = snortSql_fetchAllSettings('snortDB', 'SnortWhitelist', 'filename', $listName);
@@ -569,7 +568,9 @@ function generate_snort_conf($uuid)
if(!empty($listEnabled_rulesets)) {
foreach($listEnabled_rulesets as $enabled_item)
{
- $selected_rules_sections .= "include \$RULE_PATH/{$enabled_item['rulesetname']}\n";
+ if ($enabled_item['enable'] !== 'off') {
+ $selected_rules_sections .= "include \$RULE_PATH/{$enabled_item['rulesetname']}\n";
+ }
}
}
@@ -1110,8 +1111,13 @@ function create_snort_conf($uuid)
}
-// -------------------------- END snort.conf -------------------------
-
+function build_snort_settings($uuid) {
+
+ // create snort.conf
+ create_snort_conf($uuid);
+
+}
+// -------------------------- END snort.conf -------------------------
?>