aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-06-23 23:21:29 -0400
committerMartin Kaiser <wireshark@kaiser.cx>2014-06-27 03:21:38 +0000
commit06ba7b4b3f4de6485ed23b27299498c6863333ff (patch)
tree0ee74427ee9213ad80c12869ba887c39e458a154 /epan
parent9d4af5fccd4061521f72d42c2afb7fef78d3e690 (diff)
a USB urb of an unknown transfer type does not contain a setup packet
Change-Id: Iac6a259a1081b907149c49023614a5053440e560 Reviewed-on: https://code.wireshark.org/review/2677 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-usb.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index 5a733a5c20..d4f870d3c2 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -3337,37 +3337,14 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
break;
default:
- /* dont know */
- if (usb_conv_info->is_setup) {
- proto_item *ti;
- proto_tree *setup_tree;
-
- /* Dissect the setup header - it's applicable */
-
- ti = proto_tree_add_protocol_format(parent, proto_usb, tvb, offset, 8, "URB setup");
- setup_tree = proto_item_add_subtree(ti, usb_setup_hdr);
-
- offset = dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2);
- proto_tree_add_item(setup_tree, hf_usb_request, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- offset += 1;
- offset = dissect_usb_setup_generic(pinfo, setup_tree, tvb, offset, usb_conv_info);
- } else {
- if (header_info & USB_HEADER_IS_LINUX) {
- /* Skip setup/isochronous header - it's not applicable */
- proto_tree_add_item(tree, hf_usb_urb_unused_setup_header, tvb, offset, 8, ENC_NA);
- offset += 8;
- }
- }
-
- /*
- * If this has a 64-byte header, process the extra 16 bytes of
- * pseudo-header information.
- */
- if ((header_info & USB_HEADER_IS_LINUX) &&
- (header_info & USB_HEADER_IS_64_BYTES)) {
- offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree);
+ /* unknown transfer type */
+ /* XXX - bring up an expert info if the urb contains a setup packet */
+ if (header_info & USB_HEADER_IS_LINUX) {
+ proto_tree_add_item(tree, hf_usb_urb_unused_setup_header, tvb, offset, 8, ENC_NA);
+ offset += 8;
+ if (header_info & USB_HEADER_IS_64_BYTES)
+ offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree);
}
-
break;
}