diff --git a/pandora_agents/pc/pandora_agent.redhat.spec b/pandora_agents/pc/pandora_agent.redhat.spec index ae481e3403..ce60c8841f 100644 --- a/pandora_agents/pc/pandora_agent.redhat.spec +++ b/pandora_agents/pc/pandora_agent.redhat.spec @@ -1,6 +1,7 @@ # #Pandora FMS Linux Agent # +%global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 4.0 %define release 1 diff --git a/pandora_agents/pc/pandora_agent.spec b/pandora_agents/pc/pandora_agent.spec index 1bfc289d52..5ad481315a 100644 --- a/pandora_agents/pc/pandora_agent.spec +++ b/pandora_agents/pc/pandora_agent.spec @@ -1,6 +1,7 @@ # #Pandora FMS Linux Agent # +%global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 4.0.1 %define release 1 diff --git a/pandora_agents/shellscript/linux/pandora_agent.spec b/pandora_agents/shellscript/linux/pandora_agent.spec index 64b33bfecf..9c5e0296c6 100755 --- a/pandora_agents/shellscript/linux/pandora_agent.spec +++ b/pandora_agents/shellscript/linux/pandora_agent.spec @@ -1,6 +1,7 @@ # #Pandora FMS Linux Agent # +%global __os_install_post %{nil} %define name pandorafms_agent %define version 3.2 Summary: Pandora FMS Linux agent diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5f29343d22..5a537cea8d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.769-230217 +Version: 7.0NG.769-230221 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 07e42a8119..3bdb964eb0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.769-230217" +pandora_version="7.0NG.769-230221" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 33f9b75177..cd0fdd0989 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.769'; -use constant AGENT_BUILD => '230217'; +use constant AGENT_BUILD => '230221'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index fa965af096..1a82c15221 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -1,9 +1,10 @@ # #Pandora FMS Linux Agent # +%global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230217 +%define release 230221 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index f1091e07d9..4015375532 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -1,9 +1,10 @@ # #Pandora FMS Linux Agent # +%global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230217 +%define release 230221 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 0955293f59..6d8458b318 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230217" +PI_BUILD="230221" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9d180788d6..bd75795838 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230217} +{230221} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b6a69e5783..f38933f5b9 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.769 Build 230217") +#define PANDORA_VERSION ("7.0NG.769 Build 230221") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 61bf76a879..21f5675492 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.769(Build 230217))" + VALUE "ProductVersion", "(7.0NG.769(Build 230221))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7eaf7524ea..919f840961 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.769-230217 +Version: 7.0NG.769-230221 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index d6e24860e3..524fd6c38c 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.769-230217" +pandora_version="7.0NG.769-230221" package_pear=0 package_pandora=1 diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index bb9fa19185..cd45f34f48 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -359,6 +359,10 @@ if ($config['enterprise_installed']) { } // CSRF validation. +if (isset($_SESSION['csrf_code']) === true) { + unset($_SESSION['csrf_code']); +} + html_print_csrf_hidden(); echo ''; diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index e5d15006fe..85e713bed0 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -402,6 +402,11 @@ if ($delete_user === true) { __('There was a problem deleting the profile') ); } else if ($disable_user !== false) { + // CSRF Validator. + if (html_print_csrf_error()) { + return; + } + // Disable_user. $id_user = get_parameter('id', 0); @@ -646,6 +651,8 @@ $limit = (int) $config['block_size']; $rowPair = true; $iterator = 0; $cont = 0; +// Creates csrf. +$csrf = html_print_csrf_hidden(true); foreach ($info as $user_id => $user_info) { if (empty($user_id) === true) { continue; @@ -815,6 +822,8 @@ foreach ($info as $user_id => $user_info) { $user_info['id_user'], true ); + // Same csrf for every disable button for submit. + $data[6] .= $csrf; $data[6] .= html_print_input_hidden( 'disable_user', $toDoAction, diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index b0f698252b..99e28e3983 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -104,6 +104,7 @@ class Diagnostics extends Wizard 'getChartAjax', 'formFeedback', 'createdScheduleFeedbackTask', + 'getSystemDate', ]; @@ -209,6 +210,7 @@ class Diagnostics extends Wizard 'getAttachmentFolder', 'getInfoTagenteDatos', 'getServerThreads', + 'getSystemDate', ]; if ($this->pdf === true) { @@ -278,6 +280,10 @@ class Diagnostics extends Wizard $title = __('SQL show engine innodb status'); break; + case 'getSystemDate': + $title = __('Date system'); + break; + default: // Not possible. $title = ''; @@ -516,6 +522,27 @@ class Diagnostics extends Wizard } + /** + * Date system + * + * @return string + */ + public function getSystemDate(): string + { + $result = [ + 'error' => false, + 'data' => [ + 'date' => [ + 'name' => __('System Date (Console)'), + 'value' => date('H:i:s Y-m-d'), + ], + ], + ]; + + return json_encode($result); + } + + /** * Database size stats. * diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 9aae307bc5..96553d2ac4 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -413,73 +413,74 @@ class SnmpConsole extends HTML 'class' => 'flex-row', 'inputs' => [ [ - 'label' => __('Alert'), - 'type' => 'select', - 'id' => 'filter_alert', - 'name' => 'filter_alert', - 'class' => 'w200px', - 'fields' => $show_alerts, - 'return' => true, - 'selected' => $this->filter_alert, + 'label' => __('Alert'), + 'type' => 'select', + 'id' => 'filter_alert', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_alert', + 'fields' => $show_alerts, + 'return' => true, + 'selected' => $this->filter_alert, ], [ - 'label' => __('Severity'), - 'type' => 'select', - 'id' => 'filter_severity', - 'name' => 'filter_severity', - 'class' => 'w200px', - 'fields' => $severities, - 'return' => true, - 'selected' => $this->filter_severity, + 'label' => __('Severity'), + 'type' => 'select', + 'id' => 'filter_severity', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_severity', + 'fields' => $severities, + 'return' => true, + 'selected' => $this->filter_severity, ], [ - 'label' => __('Free search'), - 'type' => 'text', - 'class' => 'w400px', - 'id' => 'filter_free_search', - 'name' => 'filter_free_search', - 'value' => $this->filter_free_search, + 'label' => __('Free search'), + 'type' => 'text', + 'id' => 'filter_free_search', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_free_search', + 'value' => $this->filter_free_search, ], [ - 'label' => __('Status'), - 'type' => 'select', - 'id' => 'filter_status', - 'name' => 'filter_status', - 'class' => 'w200px', - 'fields' => $status_array, - 'return' => true, - 'selected' => $this->filter_status, + 'label' => __('Status'), + 'type' => 'select', + 'id' => 'filter_status', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_status', + 'fields' => $status_array, + 'return' => true, + 'selected' => $this->filter_status, ], [ - 'label' => __('Group by Enterprise String/IP'), - 'type' => 'select', - 'name' => 'filter_group_by', - 'selected' => $this->filter_group_by, - 'disabled' => false, - 'return' => true, - 'id' => 'filter_group_by', - 'fields' => [ + 'label' => __('Group by Enterprise String/IP'), + 'type' => 'select', + 'name' => 'filter_group_by', + 'selected' => $this->filter_group_by, + 'disabled' => false, + 'return' => true, + 'id' => 'filter_group_by', + 'input_class' => 'filter_input_datatable', + 'fields' => [ 0 => __('No'), 1 => __('Yes'), ], ], [ - 'label' => __('Max. hours old'), - 'type' => 'text', - 'class' => 'w200px', - 'id' => 'filter_hours_ago', - 'name' => 'filter_hours_ago', - 'value' => $this->filter_hours_ago, + 'label' => __('Max. hours old'), + 'type' => 'text', + 'id' => 'filter_hours_ago', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_hours_ago', + 'value' => $this->filter_hours_ago, ], [ - 'label' => __('Trap type'), - 'type' => 'select', - 'id' => 'filter_trap_type', - 'name' => 'filter_trap_type', - 'class' => 'w200px', - 'fields' => $trap_types, - 'return' => true, - 'selected' => $this->filter_trap_type, + 'label' => __('Trap type'), + 'type' => 'select', + 'id' => 'filter_trap_type', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_trap_type', + 'fields' => $trap_types, + 'return' => true, + 'selected' => $this->filter_trap_type, ], ], ], diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6b8c7c25fa..af73bd3842 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230217'; +$build_version = 'PC230221'; $pandora_version = 'v7.0NG.769'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 277eb8520c..2d474a9853 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -797,6 +797,7 @@ if (is_ajax()) { $db_fragmentation = json_decode($d->getTablesFragmentation()); $sys_info = json_decode($d->getSystemInfo()); $php_sys = json_decode($d->getPHPSetup()); + $system_date = json_decode($d->getSystemDate()); $fragmentation_status = ''; if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) { @@ -1030,6 +1031,14 @@ if (is_ajax()) {

'.$sys_info->data->ipInfo->value.'

+ + +

'.$system_date->data->date->name.'

+ + +

'.$system_date->data->date->value.'

+ + diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 40ecaf11ba..30592ed6db 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -323,6 +323,27 @@ a.pandora_pagination.current:hover { cursor: default; } +.filter_input_datatable { + width: 45% !important; + display: flex; + flex-wrap: nowrap; + flex-direction: row; + max-width: 450px; + min-width: 400px; +} +.filter_input_datatable input { + flex: 1; +} +.filter_input_datatable label { + width: 93px; + max-width: 100%; +} +.filter_input_datatable .select2.select2-container { + flex: 1; +} +.datatable_filter.content li.filter_input_datatable { + margin: 1em 0; +} /* Default datatable filter style */ .datatable_filter.content { display: flex; @@ -337,6 +358,7 @@ a.pandora_pagination.current:hover { .datatable_filter.content li { flex: 1 1 auto; margin: 1em auto; + padding: 0px 10px; } .sorting_desc { background: url(../../images/sort_down_green.png) no-repeat; diff --git a/pandora_console/index.php b/pandora_console/index.php index 1826dbe789..d7f124575b 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1049,6 +1049,7 @@ if (isset($_GET['bye'])) { header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + generate_csrf_code(); // Process logout. include 'general/logoff.php'; diff --git a/pandora_console/install.php b/pandora_console/install.php index 64d39e5054..5976f2c24e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index c55f4cf77e..c0b76421d6 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.769 -%define release 230217 +%define release 230221 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index be9a0956f6..9e9f965d17 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.769 -%define release 230217 +%define release 230221 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 81d1b4707e..bab7c61067 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.769 -%define release 230217 +%define release 230221 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index db55df207d..21fd247902 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -97,7 +97,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('first_login', 0), ('mins_fail_pass', 5), ('number_attempts', 5), -('enable_pass_policy_admin', 0), +('enable_pass_policy_admin', 1), ('enable_pass_history', 0), ('compare_pass', 3), ('meta_style', 'meta_pandora'), diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index f146cb617f..e2aff4a8ee 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.769-230217 +Version: 7.0NG.769-230221 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index c043b87942..06ad3682b9 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.769-230217" +pandora_version="7.0NG.769-230221" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 906cba290d..64bad6fabd 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.769"; -my $pandora_build = "230217"; +my $pandora_build = "230221"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index ffa9bed645..146068c3b9 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.769"; -my $pandora_build = "230217"; +my $pandora_build = "230221"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a458b87edd..e972b323a3 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -1,9 +1,10 @@ # # Pandora FMS Server # +%global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230217 +%define release 230221 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 85b84f28e2..3412365986 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -1,9 +1,10 @@ # # Pandora FMS Server # +%global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230217 +%define release 230221 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index f81e4030b3..cd73c5e77f 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230217" +PI_BUILD="230221" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9a1f94b0ee..b54b653594 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.769 Build 230217"; +my $version = "7.0NG.769 Build 230221"; # Pandora server configuration my %conf; @@ -53,6 +53,9 @@ my $SMALL_OPERATION_STEP = 1000; # 1000 is default # Timeout for lock acquisition. my $LOCK_TIMEOUT = 60; +# Cron cookies file. +my $COOKIES_FILE = '/tmp/cron-session-cookies'; + # FLUSH in each IO $| = 1; @@ -1075,9 +1078,8 @@ sub pandora_delete_old_session_data { db_do ($dbh, "DELETE FROM tsessions_php WHERE data IS NULL OR id_session REGEXP '^cron-'"); # Delete cron cookies file - my $cookie_file = '/tmp/cron-session-cookies'; log_message ('PURGE', "Deleting cron session file"); - unlink($cookie_file) or die log_message ('PURGE', "Could not delete session file"); + unlink($COOKIES_FILE); } diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ea21a3610f..37b388fb73 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.769 Build 230217"; +my $version = "7.0NG.769 Build 230221"; # save program name for logging my $progname = basename($0); diff --git a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl index c4224299ba..8cade22a61 100755 --- a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl +++ b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl @@ -571,7 +571,7 @@ foreach my $iface (keys %{$analysis_tree}) { $inUsage += $analysis_tree->{$iface}{'inUsage'}; $j++; } - if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) { + if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'outUsage'} == 0) { $outUsage += $analysis_tree->{$iface}{'outUsage'}; $k++; }