From 867b10151b1349c3e53e845a5838319336af228b 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 (cherry picked from commit 8f9db3917657ffc1626fb64e99077ac02647fe18) --- 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 ed0f3b2076..9f95e5e0c7 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -2212,7 +2212,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); @@ -2228,9 +2228,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; }