aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-14 16:31:33 +0000
committerErmal <eri@pfsense.org>2012-07-14 16:31:33 +0000
commitf03281254a3acefa5a05eab388af6295a4222ae1 (patch)
tree67d413d50b61e2a3b4486d0547b91dae19384612 /config/snort/snort.inc
parent2ba2f84667c00a0d46b0afba4b14b853dafe052b (diff)
downloadpfsense-packages-f03281254a3acefa5a05eab388af6295a4222ae1.tar.gz
pfsense-packages-f03281254a3acefa5a05eab388af6295a4222ae1.tar.bz2
pfsense-packages-f03281254a3acefa5a05eab388af6295a4222ae1.zip
Remove subnets from ips of interfaces and also put gateways of other interfaces selected in.
Diffstat (limited to 'config/snort/snort.inc')
-rw-r--r--config/snort/snort.inc20
1 files changed, 8 insertions, 12 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index bc7d4b13..20cae53c 100644
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -138,8 +138,13 @@ function snort_build_list($listname = "") {
if (function_exists('get_interface_ip')) {
$subnet = get_interface_ip($int);
if (is_ipaddr($subnet)) {
- $sn = get_interface_subnet($int);
- $home_net .= "{$subnet}/{$sn} ";
+ $home_net .= "{$subnet} ";
+ }
+ if ($wangw == 'yes') {
+ /* Add Gateway on WAN interface to whitelist (For RRD graphs) */
+ $gw = get_interface_gateway($int);
+ if (is_ipaddr($gw))
+ $home_net .= "{$gw} ";
}
} else {
$ifcfg = $config['interfaces'][$int];
@@ -162,22 +167,13 @@ function snort_build_list($listname = "") {
break;
default:
if (is_ipaddr($ifcfg['ipaddr'])) {
- $subnet = gen_subnet($ifcfg['ipaddr'], $ifcfg['subnet']);
- if ($ifcfg['subnet'])
- $home_net .= "{$subnet}/{$ifcfg['subnet']} ";
+ $home_net .= "{$ifcfg['ipaddr']} ";
}
break;
}
}
}
- if ($wangw == 'yes') {
- /* Add Gateway on WAN interface to whitelist (For RRD graphs) */
- $gw = get_interface_gateway('wan');
- if (is_ipaddr($gw))
- $home_net .= "{$gw} ";
- }
-
if ($wandns == 'yes') {
/* Add DNS server for WAN interface to whitelist */
$dns_servers = get_dns_servers();