aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2013-01-29 18:38:43 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2013-01-29 18:38:43 -0500
commit7cd0a22659afa5036ea23c3fd1b485bce9d115c6 (patch)
treee585a9b2987044d89adc3a983b8ea6e0a33017a2 /config/snort
parent2b73b7a8c03ba72ed189168656c934adfc8ed059 (diff)
parent7f9b922b709063e69dfa117883169c4b04a2b5a8 (diff)
downloadpfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.tar.gz
pfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.tar.bz2
pfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.zip
Merge branch 'master' of https://github.com/bsdperimeter/pfsense-packages
Diffstat (limited to 'config/snort')
-rwxr-xr-xconfig/snort/snort.inc17
-rw-r--r--config/snort/snort_interfaces_global.php4
2 files changed, 10 insertions, 11 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 9f122d7d..dede1f1d 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -147,8 +147,13 @@ function snort_build_list($snortcfg, $listname = "", $whitelist = false) {
$home_net .= "{$snortip} ";
if (function_exists('get_interface_ipv6')) {
$snortip = get_interface_ipv6($snortcfg['interface']);
- if (is_ipaddrv6($snortip))
- $home_net .= "{$snortip} ";
+ if (is_ipaddrv6($snortip)) {
+ if ($whitelist === false) {
+ $sn = get_interface_subnet($int);
+ $home_net .= "{$subnet}/{$sn} ";
+ } else
+ $home_net .= "{$subnet} ";
+ }
}
/* iterate through interface list and write out whitelist items
@@ -446,17 +451,11 @@ function snort_postinstall() {
if (file_exists('/usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example.so'))
exec('/bin/rm /usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example*');
- /*
- mwexec("/usr/sbin/chown -R snort:snort /var/log/snort", true);
- mwexec("/usr/sbin/chown -R snort:snort {$snortdir}", true);
- mwexec('/usr/sbin/chown -R snort:snort /usr/local/lib/snort', true);
- mwexec('/usr/sbin/chown snort:snort /tmp/snort*', true);
- */
-
/* remake saved settings */
if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') {
update_status(gettext("Saved settings detected..."));
update_output_window(gettext("Please wait... rebuilding files..."));
+ @include_once("/usr/local/pkg/snort/snort_check_for_rule_updates.php");
sync_snort_package_config();
update_output_window(gettext("Finnished Rebuilding files..."));
}
diff --git a/config/snort/snort_interfaces_global.php b/config/snort/snort_interfaces_global.php
index eb371119..9dde8aaf 100644
--- a/config/snort/snort_interfaces_global.php
+++ b/config/snort/snort_interfaces_global.php
@@ -75,11 +75,11 @@ if (!$input_errors) {
$retval = 0;
- write_config();
-
/* create whitelist and homenet file then sync files */
sync_snort_package_config();
+ write_config();
+
/* forces page to reload new settings */
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );