aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hci_h4.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-03-03 08:51:04 +0100
committerAnders Broman <a.broman58@gmail.com>2014-03-06 05:53:52 +0000
commit248c284622bd330ab91b08ffda9d5497b60bb68a (patch)
tree8c25e343ac513bc3b9221174643f7963bce19590 /epan/dissectors/packet-hci_h4.c
parente2ed48a8d38e7a885d47ba213e7deb72e18ca3d9 (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.c6
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;