Skip to content

Commit 5c6a316

Browse files
committed
fixing a bug where devices will get the wrong interface via api
1 parent 4795694 commit 5c6a316

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/kt/device_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ func (d *Device) AddInterfaces(ints []*interfacepb.Interface) {
203203
devID = 0
204204
}
205205

206+
if DeviceID(devID) != d.ID { // Double check that this device id matches the interface's id.
207+
continue
208+
}
209+
206210
iface := Interface{
207211
DeviceID: DeviceID(devID),
208212
Description: p.GetInterfaceDescription(),

0 commit comments

Comments
 (0)