diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 22:40:44 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 22:40:44 -0400 |
commit | 941115cc178e90650a7d97f2ac929f2441d2f694 (patch) | |
tree | 047dc80863d3abf29ce1c2772accb1e3fedc4abb /config/snort/snort.inc | |
parent | 3321f53eb16bb7db6522ee571a1df97e2045c82d (diff) | |
download | pfsense-packages-941115cc178e90650a7d97f2ac929f2441d2f694.tar.gz pfsense-packages-941115cc178e90650a7d97f2ac929f2441d2f694.tar.bz2 pfsense-packages-941115cc178e90650a7d97f2ac929f2441d2f694.zip |
Adjust rule set downloads for new unique service entries.
Diffstat (limited to 'config/snort/snort.inc')
-rwxr-xr-x | config/snort/snort.inc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 53ae4a9d..49376aa8 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -634,6 +634,40 @@ function snort_start_all_interfaces($background=FALSE) { } } +function snort_stop_all_interfaces() { + + /*************************************************************/ + /* This function stops all configured Snort interfaces. */ + /*************************************************************/ + + global $g, $config; + + /* do nothing if no Snort interfaces active */ + if (!is_array($config['installedpackages']['snortglobal']['rule'])) + return; + + foreach ($config['installedpackages']['snortglobal']['rule'] as $snortcfg) { + snort_stop($snortcfg, get_real_interface($snortcfg['interface'])); + } +} + +function snort_restart_all_interfaces() { + + /*************************************************************/ + /* This function stops all configured Snort interfaces and */ + /* restarts enabled Snort interfaces. */ + /*************************************************************/ + + global $g, $config; + + /* do nothing if no Snort interfaces active */ + if (!is_array($config['installedpackages']['snortglobal']['rule'])) + return; + + snort_stop_all_interfaces(); + snort_start_all_interfaces(TRUE); +} + function snort_reload_config($snortcfg, $signal="SIGHUP") { /*************************************************************/ |