andrzej-kaczmarek commented on a change in pull request #611: Don't add all
zeros IRKs to resolv list
URL: https://github.com/apache/mynewt-nimble/pull/611#discussion_r334855586
##########
File path: nimble/controller/src/ble_ll_resolv.c
##########
@@ -306,18 +317,21 @@ ble_ll_resolv_list_add(const uint8_t *cmdbuf, uint8_t
len)
/* By default use privacy network mode */
rl->rl_priv_mode = BLE_HCI_PRIVACY_NETWORK;
- /* Add peer IRK to HW resolving list. Should always succeed since we
- * already checked if there is room for it.
- */
- rc = ble_hw_resolv_list_add(rl->rl_peer_irk);
- BLE_LL_ASSERT (rc == BLE_ERR_SUCCESS);
-
/* generate a local and peer RPAs now, those will be updated by timer
* when resolution is enabled
*/
ble_ll_resolv_gen_priv_addr(rl, 1);
ble_ll_resolv_gen_priv_addr(rl, 0);
- ++g_ble_ll_resolv_data.rl_cnt;
+ g_ble_ll_resolv_data.rl_cnt++;
+
+ /* Add peers IRKs to HW resolving list. Should always succeed since we
+ * already checked if there is room for it.
+ */
+ if (ble_ll_resolv_irk_nonzero(cmd->peer_irk)) {
+ rc = ble_hw_resolv_list_add(rl->rl_peer_irk);
+ BLE_LL_ASSERT (rc == BLE_ERR_SUCCESS);
Review comment:
whitespace
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services