diff options
author | Tomasz Moń <desowin@gmail.com> | 2022-12-10 19:34:16 +0100 |
---|---|---|
committer | Tomasz Moń <desowin@gmail.com> | 2022-12-10 19:40:34 +0100 |
commit | cf6fd1248f58cba161885f030cf0ed038ddd6377 (patch) | |
tree | 8829c73e0d8c7ff65cbf190f56237a120f14216e /epan/dissectors/packet-usb.c | |
parent | 17d7b7cb73d97c986de8dc0026d2b7604d569dd2 (diff) |
USB: Fix Darwin source and destination handling
Set the direction based on request type in a similar manner as it done
for other URB types, i.e. set source to host on URB submit. Correctly
set bus number based on locationID upper 8 bits.
Fixes #16768
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-rw-r--r-- | epan/dissectors/packet-usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index c0e8342480..cd2b839adc 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -5220,10 +5220,10 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, break; case USB_HEADER_DARWIN: - urb_type = tvb_get_guint8(tvb, 1); + urb_type = tvb_get_guint8(tvb, 3) ? URB_COMPLETE : URB_SUBMIT; endpoint = tvb_get_guint8(tvb, 30) & 0x7F; device_address = (guint16)tvb_get_guint8(tvb, 29); - location = tvb_get_letohl(tvb, 23); + location = tvb_get_letohl(tvb, 24); bus_id = location >> 24; break; |