aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-07 23:48:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-07 23:48:52 +0000
commitdda1f1a54816edcb2048cc340eb70b6e83083484 (patch)
tree112e5fdd53d353b5c2e7c1d0893fcd3076ddabd0 /packages/snort
parent12b3e2072a87d209c766be18e493780660690d0f (diff)
downloadpfsense-packages-dda1f1a54816edcb2048cc340eb70b6e83083484.tar.gz
pfsense-packages-dda1f1a54816edcb2048cc340eb70b6e83083484.tar.bz2
pfsense-packages-dda1f1a54816edcb2048cc340eb70b6e83083484.zip
Tighten the home net checks trying to eliminte blank entries that can lead to ,/,
Diffstat (limited to 'packages/snort')
-rw-r--r--packages/snort/snort.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 14c9a33a..5f456922 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -266,13 +266,16 @@ function generate_snort_conf() {
/* iterate all vips and add to whitelist */
if($config['virtualip'])
foreach($config['virtualip']['vip'] as $vip)
- $home_net .= $vip['subnet'] . " ";
+ if($vip['subnet'])
+ $home_net .= $vip['subnet'] . " ";
if($config['installedpackages']['snortwhitelist'])
foreach($config['installedpackages']['snortwhitelist']['config'] as $snort)
- $home_net .= $snort['ip'] . " ";
+ if($snort['ip'])
+ $home_net .= $snort['ip'] . " ";
/* write out whitelist, convert spaces to carriage returns */
+ $whitelist_home_net = str_replace(" ", " ", $home_net);
$whitelist_home_net = str_replace(" ", "\n", $home_net);
/* make $home_net presentable to snort */