Skip to content

Commit

Permalink
fix: speed link is wrongly converted
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Feb 27, 2025
1 parent ee9b4fd commit 9317f99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/source/vmware/vmware_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,9 @@ func (vc *VmwareSource) collectHostPhysicalNicData(
}
}

pnicType := objects.IfaceSpeed2IfaceType[objects.InterfaceSpeed(pnicLinkSpeedMb)]
pnicLinkSpeedKb := pnicLinkSpeedMb * constants.KB
pnicType := objects.IfaceSpeed2IfaceType[objects.InterfaceSpeed(pnicLinkSpeedKb)]

if pnicType == nil {
pnicType = &objects.OtherInterfaceType
}
Expand All @@ -660,7 +662,7 @@ func (vc *VmwareSource) collectHostPhysicalNicData(
Name: pnicName,
Status: true,
Type: pnicType,
Speed: objects.InterfaceSpeed(pnicLinkSpeedMb / constants.KB),
Speed: objects.InterfaceSpeed(pnicLinkSpeedKb),
MTU: pnicMtu,
Mode: pnicMode,
TaggedVlans: taggedVlanList,
Expand Down

0 comments on commit 9317f99

Please sign in to comment.