From d39a8aa1dd596068db94db4ad1b774f99598cfff Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 16 Jul 2012 10:05:47 +0000 Subject: Enable support for IPv6 into snort code for 2.1 --- config/snort/snort.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 371b0e5b..cd01ff65 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -155,8 +155,12 @@ function snort_build_list($snortcfg, $listname = "") { /* calculate interface subnet information */ if (function_exists('get_interface_ip')) { $subnet = get_interface_ip($int); - if (is_ipaddr($subnet)) { + if (is_ipaddr($subnet)) $home_net .= "{$subnet} "; + if (function_exists("get_interface_ipv6")) { + $subnet = get_interface_ipv6($int); + if (is_ipaddrv6($subnet)) + $home_net .= "{$subnet} "; } } else { $ifcfg = $config['interfaces'][$int]; @@ -190,6 +194,11 @@ function snort_build_list($snortcfg, $listname = "") { $gw = get_interface_gateway($snortcfg['interface']); if (is_ipaddr($gw)) $home_net .= "{$gw} "; + if (function_exists("get_interface_gatewayv6")) { + $gw = get_interface_gatewayv6($snortcfg['interface']); + if (is_ipaddrv6($gw)) + $home_net .= "{$gw} "; + } } if ($wandns == 'yes') { -- cgit v1.2.3