diff options
author | Ermal <eri@pfsense.org> | 2011-08-03 08:50:45 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-08-03 08:50:45 +0000 |
commit | 7d7a5b66b63cdce23661c1e7e76643ffc196db26 (patch) | |
tree | f165a6c83266985177dbdb12b735337096d64d14 /config/snort/snort.inc | |
parent | 362e56bb3514ea92891d2fcffc64d0e122a7c359 (diff) | |
download | pfsense-packages-7d7a5b66b63cdce23661c1e7e76643ffc196db26.tar.gz pfsense-packages-7d7a5b66b63cdce23661c1e7e76643ffc196db26.tar.bz2 pfsense-packages-7d7a5b66b63cdce23661c1e7e76643ffc196db26.zip |
Check that wrong input is not posted on the final config file. Let the pacakge system handle removing of freebsd packages. When starting stopping from the Snort Interfaces screen sync the configuration as well.
Diffstat (limited to 'config/snort/snort.inc')
-rw-r--r-- | config/snort/snort.inc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc index ab6d2e64..61fe4a70 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -123,8 +123,10 @@ function build_base_whitelist($build_netlist, $wanip, $wangw, $wandns, $vips, $v /* calculate interface subnet information */ if (function_exists('get_interface_ip')) { $subnet = get_interface_ip($int); - $sn = get_interface_subnet($int); - $home_net .= "{$subnet}/{$sn} "; + if (is_ipaddr($subnet)) { + $sn = get_interface_subnet($int); + $home_net .= "{$subnet}/{$sn} "; + } } else { $ifcfg = $config['interfaces'][$int]; switch ($ifcfg['ipaddr']) { @@ -1646,11 +1648,6 @@ function snort_deinstall() sleep(2); mwexec('/usr/sbin/pw userdel snort; /usr/sbin/pw groupdel snort', true); mwexec('/bin/rm -rf /usr/local/etc/snort*; /bin/rm -rf /usr/local/pkg/snort*; /bin/rm -rf /usr/local/pkg/pf/snort*', true); - - /* XXX */ - mwexec("/usr/sbin/pkg_delete -x snort", true); - mwexec("/usr/sbin/pkg_delete -x perl-threaded", true); - mwexec("/usr/sbin/pkg_delete -x mysql-client-5.1.50_1", true); mwexec('/bin/rm -r /usr/local/bin/barnyard2', true); mwexec('/bin/rm -rf /usr/local/www/snort; /bin/rm -rf /usr/local/lib/snort; /bin/rm -rf /var/log/snort; /bin/rm -rf /usr/local/pkg/snort, true'); @@ -1769,6 +1766,7 @@ function generate_snort_conf($id, $if_real, $snort_uuid) } /* define threshold file */ + $threshold_file_name = ""; if ($snortcfg['suppresslistname'] != 'default') { if (preg_match('/^([a-zA-z0-9]+)/', $snortcfg['suppresslistname'], $slist_name_file2)) { $threshold_name = $slist_name_file2[0]; |