Bluetooth: Change authentication requirement. 30/317430/1
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 07:34:11 +0000 (13:04 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 2 Jan 2025 06:09:03 +0000 (15:09 +0900)
This patch updates the authentication requirement to general
MITM if local and remote device IO capabilities are not
NO_INPUT_NO_OUTPUT.

Change-Id: Ideed583823347bbcedb5901a73bb648d4168d93e
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
net/bluetooth/hci_event.c

index 88d57e32b1c693965e889f5ce41e53f0370100bb..784397d0f3e5ea30f6193cb4f4eeb9b8e334e0d8 100644 (file)
@@ -5315,6 +5315,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)