From 657ca31b90a8b5a7509537f0ee76335f593d9de7 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 20 Apr 2017 15:01:45 +0300 Subject: [PATCH] monitor: Fix not decoding control frames In order to enable decoding control frames packet_monitor needs to check if the index is set to HCI_DEV_NONE since that will call packet_ctrl_open which setups the ctrl and assign it a cookie. --- monitor/packet.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/monitor/packet.c b/monitor/packet.c index 89423d1ae..2e09dda04 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -3866,10 +3866,11 @@ void packet_monitor(struct timeval *tv, struct ucred *cred, uint16_t manufacturer; const char *ident; - if (index_filter && index_number != index) - return; - - index_current = index; + if (index != HCI_DEV_NONE) { + if (index_filter && index_number != index) + return; + index_current = index; + } if (tv && time_offset == ((time_t) -1)) time_offset = tv->tv_sec; -- 2.47.3