From a14b100b3fa83999e49782c446549c0c564f7c1d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 9 Jan 2023 14:53:10 +0100 Subject: [PATCH] #10023 Fixed unknown duplex --- pandora_server/util/plugin/pandora_snmp_bandwidth.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl index 1d011e31bf..c4224299ba 100755 --- a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl +++ b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl @@ -136,6 +136,9 @@ sub update_config_key ($) { if ($arg eq 'outUsage') { return "outUsage"; } + if ($arg eq 'f') { + return "unknown_fullduplex"; + } } ################################################################################ @@ -232,7 +235,11 @@ sub prepare_tree { if (ref($duplex) eq "HASH") { if (! exists($duplex->{'data'}) || ($duplex->{'data'} ne '2' && $duplex->{'data'} ne '3')) { # Unknown duplex. - $duplex = 1; + if (is_enabled($config->{'unknown_fullduplex'})) { + $duplex = 3; + } else { + $duplex = 1; + } } else { $duplex = int $duplex->{'data'}; }