From a5356a9f8bbaa08d1d2d0926ccedda5f20d0295d Mon Sep 17 00:00:00 2001 From: Onkar Date: Thu, 30 Dec 2021 12:14:45 +0530 Subject: [PATCH] Bugfix: key_size_persist - nimble upstream change --- nimble/host/src/ble_sm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c index b70198953..6fa029bbf 100644 --- a/nimble/host/src/ble_sm.c +++ b/nimble/host/src/ble_sm.c @@ -2083,6 +2083,7 @@ ble_sm_key_exch_exec(struct ble_sm_proc *proc, struct ble_sm_result *res, /* store LTK before sending since ble_sm_tx consumes tx mbuf */ memcpy(proc->our_keys.ltk, enc_info->ltk, 16); + proc->our_keys.key_size = proc->key_size; proc->our_keys.ltk_valid = 1; rc = ble_sm_tx(proc->conn_handle, txom); @@ -2261,6 +2262,7 @@ ble_sm_enc_info_rx(uint16_t conn_handle, struct os_mbuf **om, proc->rx_key_flags &= ~BLE_SM_KE_F_ENC_INFO; proc->peer_keys.ltk_valid = 1; memcpy(proc->peer_keys.ltk, cmd->ltk, 16); + proc->peer_keys.key_size = proc->key_size; ble_sm_key_rxed(proc, res); }