From c92ead044f54084e5b481009036801fdad66d273 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Thu, 2 Nov 2006 16:38:49 +0000 Subject: make $HOME_NET work for multiple IPs --- packages/snort/snort.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 +?> -- cgit v1.2.3