From 8f9db3917657ffc1626fb64e99077ac02647fe18 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 3 Mar 2015 14:51:19 +0100 Subject: [PATCH] Fixed an error which relaxed the requirements to retrieve network interfaces --- pandora_console/include/functions_agents.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 23df51ce87..61bf8d7eae 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -2252,7 +2252,7 @@ function agents_get_network_interfaces ($agents = false, $agents_filter = false) "descripcion", "ip_target" ); - $filter = " id_agente = $agent_id AND disabled = 0 AND id_tipo_modulo IN (".implode(",", $accepted_module_types).")"; + $filter = " id_agente = $agent_id AND disabled = 0 AND id_tipo_modulo IN (".implode(",", $accepted_module_types).") AND nombre LIKE 'ifOperStatus_%'"; $modules = agents_get_modules($agent_id, $columns, $filter, true, false); @@ -2268,9 +2268,7 @@ function agents_get_network_interfaces ($agents = false, $agents_filter = false) $interface_name = $matches[1]; $interface_name_escaped = str_replace("/", "\/", $interface_name); - if (!isset($interfaces[$interface_name]) - || (isset($interfaces[$interface_name]) - && preg_match ("/^ifOperStatus_$interface_name_escaped$/i", $module_name, $matches))) { + if (preg_match ("/^ifOperStatus_$interface_name_escaped$/i", $module_name, $matches)) { $interfaces[$interface_name] = $module; }