From dadcb727d5ac0f94081cafdcc4db55a0408a5e46 Mon Sep 17 00:00:00 2001 From: Ermal Date: Sat, 26 Jan 2013 16:47:39 +0100 Subject: Push this down here --- config/snort/snort.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 68f65158..39d48687 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -141,20 +141,20 @@ function snort_build_list($snortcfg, $listname = "", $whitelist = false) { } } - /* build an interface array list */ - if (function_exists('get_configured_interface_list')) - $int_array = get_configured_interface_list(); - else { - $int_array = array('lan'); - for ($j = 1; isset ($config['interfaces']['opt' . $j]); $j++) - if(isset($config['interfaces']['opt' . $j]['enable'])) - $int_array[] = "opt{$j}"; - } - /* iterate through interface list and write out whitelist items * and also compile a home_net list for snort. */ if ($wanip == 'yes') { + /* build an interface array list */ + if (function_exists('get_configured_interface_list')) + $int_array = get_configured_interface_list(); + else { + $int_array = array('wan', 'lan'); + for ($j = 1; isset ($config['interfaces']['opt' . $j]); $j++) + if(isset($config['interfaces']['opt' . $j]['enable'])) + $int_array[] = "opt{$j}"; + } + foreach ($int_array as $int) { /* calculate interface subnet information */ if (function_exists('get_interface_ip')) { -- cgit v1.2.3