aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index e27d8e4a..08ae54bc 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -186,7 +186,11 @@ function generate_snort_conf() {
/* write out whitelist, convert spaces to carriage returns */
$whitelist_home_net = str_replace(" ", "\n", $home_net);
- fwrite($whitelist, $whitelist_home_net);
+ /* foreach through whitelist, writing out to file */
+ $whitelist_split = split("\n", $whitelist_home_net);
+ foreach(whitelist_split as $wl)
+ if(trim($wl))
+ fwrite($whitelist, trim($wl) . "\n");
/* close file */
fclose($whitelist);