aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-03-19 12:33:54 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-19 12:33:35 +0000
commitf7461a80feb1af02e24ffa3b64feb02676250d48 (patch)
tree8878e713e9ada4bc7dc3be78edf720d2aca61f20
parent35c893421d556aa6b7cabd7a2f8a7e7575b7f697 (diff)
USB: decode HID desc for unknown iface class
If the interface class is not yet known (for example, in the enumeration phase; or if the interface descriptor was missed), then a HID descriptor would not get dissected. Instead of printing an unhelpful "unknown descriptor" message, always try to find a HID descriptor. Change-Id: Ic162d6b93b0428a1edd3a925229093dfcc52c42d Reviewed-on: https://code.wireshark.org/review/735 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index dddf9273b5..675b9ca2aa 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2040,7 +2040,8 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree,
offset = dissect_usb_device_qualifier_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info, bus_id, device_address);
break;
case USB_DT_RPIPE:
- if (usb_conv_info->interfaceClass == IF_CLASS_HID) {
+ if (usb_conv_info->interfaceClass == IF_CLASS_HID ||
+ usb_conv_info->interfaceClass == IF_CLASS_UNKNOWN) {
offset = dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info);
break;
}