Skip to content

Commit

Permalink
FilterDevice: Do not report non-USB devices in list of devices
Browse files Browse the repository at this point in the history
The driver may report non-USB device in list of devices
available for redirection (for example, this happens with
FTDI dual-port serial adapter PID 6010)

Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Dmitry Fleytman <[email protected]>
  • Loading branch information
ybendito authored and Dmitry Fleytman committed Apr 2, 2017
1 parent dddc046 commit 7c72773
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions UsbDk/FilterDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ void CUsbDkHubFilterStrategy::RegisterNewChild(PDEVICE_OBJECT PDO)
DevID->Dump();
InstanceID->Dump();

// Not a USB device -> do not register
if (!DevID->MatchPrefix(L"USB\\"))
{
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_FILTERDEVICE, "%!FUNC! Not a usb device, skip child registration");
return;
}

CUsbDkChildDevice::TDescriptorsCache CfgDescriptors(DevDescriptor.bNumConfigurations);

if (!CfgDescriptors.Create())
Expand Down

0 comments on commit 7c72773

Please sign in to comment.