aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-12 00:26:32 +0000
committerErmal <eri@pfsense.org>2012-07-12 00:26:32 +0000
commit2b38970f0f61b1ebd77aad6eab5e68053886d3fa (patch)
tree6fff220836706c1a3a5770a5b812839461bc12ad /config
parentd57e2405cb6f78181402de87979ec70257523a5a (diff)
downloadpfsense-packages-2b38970f0f61b1ebd77aad6eab5e68053886d3fa.tar.gz
pfsense-packages-2b38970f0f61b1ebd77aad6eab5e68053886d3fa.tar.bz2
pfsense-packages-2b38970f0f61b1ebd77aad6eab5e68053886d3fa.zip
If there is no suppress defined just do not create anyfile
Diffstat (limited to 'config')
-rw-r--r--config/snort/snort.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index ddc10e6c..42a1bf6c 100644
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -1022,11 +1022,14 @@ function snort_generate_conf($snortcfg) {
$spoink_type = "output alert_pf: {$snortcfgdir}/{$snortcfg['whitelistname']},snort2c,{$snortcfg['blockoffendersip']},{$pfkill}";
}
- /* define suppress file */
+ /* define selected suppress file */
+ $suppress_file_name = "";
$suppress = snort_find_list($snortcfg['suppresslistname'], 'suppress');
- $suppress_data = str_replace("\r", "", base64_decode($suppress['suppresspassthru']));
- @file_put_contents("{$snortcfgdir}/{$snortcfg['suppresslistname']}", $suppress_data);
- $suppress_file_name = "include {$snortcfgdir}/{$snortcfg['suppresslistname']}";
+ if (!empty($suppress)) {
+ $suppress_data = str_replace("\r", "", base64_decode($suppress['suppresspassthru']));
+ @file_put_contents("{$snortcfgdir}/{$snortcfg['suppresslistname']}", $suppress_data);
+ $suppress_file_name = "include {$snortcfgdir}/{$snortcfg['suppresslistname']}";
+ }
/* set the snort performance model */
$snort_performance = "ac-bnfa";