diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c index c63af4087..5489551ae 100644 --- a/nimble/host/src/ble_sm.c +++ b/nimble/host/src/ble_sm.c @@ -2041,14 +2041,16 @@ ble_sm_key_exch_success(struct ble_sm_proc *proc, struct ble_sm_result *res) /* The procedure is now complete. Update connection bonded state and * terminate procedure. */ + int bonded = !!(proc->flags & BLE_SM_PROC_F_BONDING); ble_sm_update_sec_state(proc->conn_handle, 1, !!(proc->flags & BLE_SM_PROC_F_AUTHENTICATED), - !!(proc->flags & BLE_SM_PROC_F_BONDING), + bonded, proc->key_size); proc->state = BLE_SM_PROC_STATE_NONE; res->app_status = 0; res->enc_cb = 1; + res->bonded = bonded; } static void