aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/snort/snort.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 10e2f1f2..cf04d647 100644
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -1168,7 +1168,6 @@ function sync_snort_package_config()
/* Start of main config files */
/* create threshold file */
-/* TODO: other func should mirror this code */
function create_snort_suppress($id, $if_real) {
global $config, $g;
@@ -1176,6 +1175,9 @@ function create_snort_suppress($id, $if_real) {
if (!is_dir('/usr/local/etc/snort/suppress'))
exec('/bin/mkdir -p /usr/local/etc/snort/suppress');
+ if (!is_array($config['installedpackages']['snortglobal']['rule']))
+ return;
+
if ($config['installedpackages']['snortglobal']['rule'][$id]['suppresslistname'] != 'default') {
if (preg_match('/([0-9]+)$/', $config['installedpackages']['snortglobal']['rule'][$id]['suppresslistname'], $slist_num_wrt)) {