diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-03-03 08:51:04 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-06 05:53:52 +0000 |
commit | 248c284622bd330ab91b08ffda9d5497b60bb68a (patch) | |
tree | 8c25e343ac513bc3b9221174643f7963bce19590 /epan/dissectors/packet-hci_usb.c | |
parent | e2ed48a8d38e7a885d47ba213e7deb72e18ca3d9 (diff) |
Bluetooth: Fix interface_id
Interface ID should correspond to the Wireshark Interface Id
to avoid mixing data from various interfaces in dissectors.
Change-Id: Ibaa3ddab7f0ebd0985efea74439b94a5881145a7
Reviewed-on: https://code.wireshark.org/review/472
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-hci_usb.c')
-rw-r--r-- | epan/dissectors/packet-hci_usb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-hci_usb.c b/epan/dissectors/packet-hci_usb.c index d2bdf14563..f8527cd4aa 100644 --- a/epan/dissectors/packet-hci_usb.c +++ b/epan/dissectors/packet-hci_usb.c @@ -28,6 +28,7 @@ #include <epan/prefs.h> #include <epan/reassemble.h> #include <epan/wmem/wmem.h> +#include <wiretap/wtap.h> #include "packet-usb.h" #include "packet-bluetooth-hci.h" @@ -170,12 +171,10 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) session_id = usb_conv_info->bus_id << 16 | usb_conv_info->device_address << 8 | ((pinfo->p2p_dir == P2P_DIR_RECV) ? 1 : 0 ) << 7 | usb_conv_info->endpoint; hci_data = (hci_data_t *) wmem_new(wmem_packet_scope(), hci_data_t); - - if (usb_conv_info->device_protocol == 0xE00104) - hci_data->interface_id = HCI_INTERFACE_AMP; + if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) + hci_data->interface_id = pinfo->phdr->interface_id; else - hci_data->interface_id = HCI_INTERFACE_USB; - + hci_data->interface_id = HCI_INTERFACE_DEFAULT; hci_data->adapter_id = usb_conv_info->bus_id << 8 | usb_conv_info->device_address; hci_data->chandle_to_bdaddr_table = chandle_to_bdaddr_table; hci_data->bdaddr_to_name_table = bdaddr_to_name_table; |