From d7ae97de69427693d6a47201616e766f3c662b8d Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 25 May 2016 18:00:14 +0200 Subject: [PATCH] Bluetooth: Fix sending DHKey event if invalid key was provided bt_recv should be used to send event back to stack. Change-Id: I092e2480b3f0e5c40c0751c30be46d0310012bae Signed-off-by: Szymon Janc --- net/bluetooth/hci_ecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_ecc.c b/net/bluetooth/hci_ecc.c index d449639cfe0..aa84054c3db 100644 --- a/net/bluetooth/hci_ecc.c +++ b/net/bluetooth/hci_ecc.c @@ -166,7 +166,7 @@ static void emulate_le_generate_dhkey(struct net_buf *buf) if (ecc_valid_public_key(&pk) < 0) { evt->status = 0x1f; /* unspecified error */ memset(evt->dhkey, 0, sizeof(evt->dhkey)); - nano_fifo_put(&bt_dev.rx_queue, buf); + bt_recv(buf); return; }