mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-21 20:27:55 +00:00
nimble/sm: Fix rejecting stronger bond
If there exists an authenticated bond and the slave sends a security request with No MITM we should not try to pair again as the stored bond is stronger than the requested one.
This commit is contained in:
@@ -1961,9 +1961,7 @@ ble_sm_sec_req_rx(uint16_t conn_handle, struct os_mbuf **om,
|
||||
* requested minimum authreq.
|
||||
*/
|
||||
authreq_mitm = cmd->authreq & BLE_SM_PAIR_AUTHREQ_MITM;
|
||||
if ((!authreq_mitm && value_sec.authenticated) ||
|
||||
(authreq_mitm && !value_sec.authenticated)) {
|
||||
|
||||
if (authreq_mitm && !value_sec.authenticated) {
|
||||
res->app_status = BLE_HS_EREJECT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user