aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 6f104fb6..091fa195 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -247,6 +247,11 @@ function generate_snort_conf() {
/* write out whitelist, convert spaces to carriage returns */
$whitelist_home_net = str_replace(" ", "\n", $home_net);
+ /* make $home_net presentable to snort */
+ trim($home_net);
+ $home_net = str_replace(" ", ",", $home_net);
+ $home_net = "[{$home_net}]";
+
/* foreach through whitelist, writing out to file */
$whitelist_split = split("\n", $whitelist_home_net);
foreach($whitelist_split as $wl)
@@ -586,4 +591,4 @@ function snort_advanced() {
sync_package_snort();
}
-?> \ No newline at end of file
+?>