diff options
author | Artem Mygaiev <joculator@gmail.com> | 2019-03-30 11:10:10 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-04-06 07:24:52 +0000 |
commit | 5bd6d44ba6624f7a65819e759b13b6d25875e720 (patch) | |
tree | 2d5d96242c9d7442321cc4618966b491c230a94b | |
parent | 98bcda594ecbe3de891bf78cfb262986d1e2b8d6 (diff) |
Dissect USB "device" Setup CONTROL messages
Before this change Wireshark would assume there is no USB devices that
use "device" recepient (RQT_SETUP_RECIPIENT_DEVICE) in Setup stage of
USB CONTROL messages. But there are plenty of such, examples are:
FrescoLogic's FL2000 USB Display controller, Razer USB peripherals;
there are open projects that investigate protocols for them in order to
implement OSS drivers and SW stacks.
Allow dissection of USB "device" Setup CONTROL messages by treating them
in the same way as "other" or "reserved" with assumption that at least
IntefaceClass is set to UNKNWON (0xffff) which is true for at least
beforementioned FL2000 and Razer HW implementations.
Change-Id: I44f4f8cdccd973194aeda2c39c59529d531c31b2
Reviewed-on: https://code.wireshark.org/review/32626
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r-- | epan/dissectors/packet-usb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index e9367772ac..38a8176ff2 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -3424,13 +3424,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin ctrl_recip = USB_RECIPIENT(usb_trans_info->setup.requesttype); - if (ctrl_recip == RQT_SETUP_RECIPIENT_DEVICE) { - /* a non-standard control message addressed to a device - this is not supported (I don't think it's used - anywhere) */ - break; - } - else if (ctrl_recip == RQT_SETUP_RECIPIENT_INTERFACE) { + if (ctrl_recip == RQT_SETUP_RECIPIENT_INTERFACE) { guint8 interface_num = usb_trans_info->setup.wIndex & 0xff; heur_subdissector_list = heur_control_subdissector_list; @@ -3473,7 +3467,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin usb_conv_info->usb_trans_info = usb_trans_info; } else { - /* the recipient is "other" or "reserved" + /* the recipient is "device" or "other" or "reserved" there's no way for us to determine the interfaceClass we set the usb_dissector_table anyhow as some dissectors register for control messages to |