From 76325b2dd6d70e563b041789cc24d543f3100c58 Mon Sep 17 00:00:00 2001 From: robiscool Date: Fri, 23 Apr 2010 16:00:45 -0700 Subject: snort, add code for empty vars snort.inc --- config/snort/snort.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 892370e9..a41b415c 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -117,9 +117,6 @@ global $config, $g; $home_net .= "{$dns} "; } } - - /* Add loopback to whitelist (ftphelper) */ - $home_net .= "127.0.0.1"; if($vips == 'yes') { /* iterate all vips and add to whitelist */ @@ -129,6 +126,13 @@ global $config, $g; $home_net .= $vip['subnet'] . " "; } + /* Add loopback to whitelist (ftphelper) */ + if($userwips == 'no') { + $home_net .= "127.0.0.1"; + }else{ + $home_net .= "127.0.0.1 "; + } + /* grab a list of vpns and whitelist if user desires added by nestorfish 954 */ if($vpns == 'yes') { @@ -141,8 +145,9 @@ global $config, $g; { $vpns_list = filter_get_vpns_list(); } - - $home_net .= "$vpns_list "; + if ($vpns_list != '') { + $home_net .= "$vpns_list "; + } } /* never ever compair numbers to words */ -- cgit v1.2.3