diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-07 23:47:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-07 23:47:16 +0000 |
commit | 12b3e2072a87d209c766be18e493780660690d0f (patch) | |
tree | a04a25063d863562583a7205f38d172161736689 /packages/snort | |
parent | 5fc28a9d0e98e1821e85e9bba5c669ed7b438a74 (diff) | |
download | pfsense-packages-12b3e2072a87d209c766be18e493780660690d0f.tar.gz pfsense-packages-12b3e2072a87d209c766be18e493780660690d0f.tar.bz2 pfsense-packages-12b3e2072a87d209c766be18e493780660690d0f.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.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index b6ff4d29..14c9a33a 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -236,24 +236,28 @@ function generate_snort_conf() { $home_net .= "{$subnet} "; } else { if ($subnet) - $home_net .= "{$subnet}/{$ifcfg['subnet']} "; + if($ifcfg['subnet']) + $home_net .= "{$subnet}/{$ifcfg['subnet']} "; } } /* add all WAN ips to the whitelist */ $wan_if = get_real_wan_interface(); $ip = find_interface_ip($wan_if); - $home_net .= "{$ip} "; + if($ip) + $home_net .= "{$ip} "; /* Add Gateway on WAN interface to whitelist (For RRD graphs) */ $int = convert_friendly_interface_to_real_interface_name("WAN"); $gw = get_interface_gateway($int); - $home_net .= "{$gw} "; + if($gw) + $home_net .= "{$gw} "; /* Add DNS server for WAN interface to whitelist */ $dns_servers = get_dns_servers(); foreach($dns_servers as $dns) { - $home_net .= "{$dns} "; + if($dns) + $home_net .= "{$dns} "; } /* Add loopback to whitelist (ftphelper) */ |