From 7ff4a632b712a71a6a4f2df2f04976232983e6c2 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Thu, 5 Mar 2020 10:15:55 +0100 Subject: [PATCH] Bluetooth: host: Allow to initiate pairing without OOB present When OOB callbacks are present it is possible to achieve authenticated pairing without having the remote OOB data present. Using OOB with LE Secure Connection only one side of the pairing procedure is required to have the OOB data present. If we have given the remote our OOB data then pairing can proceed. Signed-off-by: Joakim Andersson --- subsys/bluetooth/host/smp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c index 130c68e0b1e..1c8faafe766 100644 --- a/subsys/bluetooth/host/smp.c +++ b/subsys/bluetooth/host/smp.c @@ -2677,12 +2677,10 @@ static bool sec_level_reachable(struct bt_conn *conn) return true; case BT_SECURITY_L3: return get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT || - (bt_auth && bt_auth->oob_data_request && oobd_present); + (bt_auth && bt_auth->oob_data_request); case BT_SECURITY_L4: return (get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT || - (bt_auth && bt_auth->oob_data_request && - oobd_present)) && - sc_supported; + (bt_auth && bt_auth->oob_data_request)) && sc_supported; default: return false; }