Skip to content

Commit

Permalink
Fix ifSpeed override not being applied (#15237)
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Aug 21, 2023
1 parent cbe2ba5 commit b04e317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/polling/ports.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,8 @@
}
}
if ($oid == 'ifSpeed') {
if (! empty($device['attribs']['ifSpeed:' . $port['ifName']])) {
$this_port['ifSpeed'] = $port['ifSpeed'];
}
$ifSpeed_override = DeviceCache::getPrimary()->getAttrib('ifSpeed:' . $port['ifName']);
$current_oid = $ifSpeed_override ?? $current_oid;
}

if ($port[$oid] != $current_oid && ! isset($current_oid)) {
Expand All @@ -698,6 +697,7 @@

// set the update data
$port['update'][$oid] = $current_oid;
$this_port[$oid] = $current_oid;

// store the previous values for alerting
if (in_array($oid, ['ifOperStatus', 'ifAdminStatus', 'ifSpeed'])) {
Expand Down

0 comments on commit b04e317

Please sign in to comment.