From db81bf3a1836c0ae2509510b2d0d7a81b5d00793 Mon Sep 17 00:00:00 2001 From: Sudha Bheemanna Date: Thu, 8 Sep 2016 13:04:11 +0530 Subject: [PATCH] Bluetooth: Change authentication requirement. This patch updates the authentication requirement to general MITM if local and remote device IO capabilities are not NO_INPUT_NO_OUTPUT. Change-Id: Ie3955c3f8287418e74af20d40bdf30d0f1963e31 Signed-off-by: Sudha Bheemanna Signed-off-by: Amit Purwar --- net/bluetooth/hci_event.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 6f811e5..5ed01c5 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4520,6 +4520,14 @@ unlock: static u8 hci_get_auth_req(struct hci_conn *conn) { +#ifdef TIZEN_BT + if (conn->remote_auth == HCI_AT_GENERAL_BONDING_MITM) { + if (conn->remote_cap != HCI_IO_NO_INPUT_OUTPUT && + conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) + return HCI_AT_GENERAL_BONDING_MITM; + } +#endif + /* If remote requests no-bonding follow that lead */ if (conn->remote_auth == HCI_AT_NO_BONDING || conn->remote_auth == HCI_AT_NO_BONDING_MITM) -- 2.7.4