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_h4.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_h4.c')
-rw-r--r-- | epan/dissectors/packet-hci_h4.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-hci_h4.c b/epan/dissectors/packet-hci_h4.c index 30dc188e4f..723d741e3e 100644 --- a/epan/dissectors/packet-hci_h4.c +++ b/epan/dissectors/packet-hci_h4.c @@ -31,6 +31,7 @@ #include <epan/packet.h> #include <wiretap/wtap.h> #include <epan/wmem/wmem.h> +#include <wiretap/wtap.h> #include "packet-bluetooth-hci.h" @@ -102,7 +103,10 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ } hci_data = (hci_data_t *) wmem_new(wmem_packet_scope(), hci_data_t); - hci_data->interface_id = HCI_INTERFACE_H4; + if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) + hci_data->interface_id = pinfo->phdr->interface_id; + else + hci_data->interface_id = HCI_INTERFACE_DEFAULT; hci_data->adapter_id = HCI_ADAPTER_DEFAULT; hci_data->chandle_to_bdaddr_table = chandle_to_bdaddr_table; hci_data->bdaddr_to_name_table = bdaddr_to_name_table; |