#10023 Fixed unknown duplex

This commit is contained in:
Daniel Maya 2023-01-09 14:53:10 +01:00
parent 57c9c55159
commit a14b100b3f
1 changed files with 8 additions and 1 deletions

View File

@ -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'};
}