Revert "Bluetooth: Host: Disable host-based RPA resolution when !BT_PRIVACY"
This reverts commit 5824ac90ecd8dd06d9ea117d345dbc6b069e5840. The resulting revert takes into account changes to the predicate that guards the use of `resp_addr`. In the resulting revert, the predicate guarding the use of `resp_addr` is differs from the naive revert because the intention of that predicate is to know when `conn.c:bt_conn_le_create` decided to use the Host resolver. And, the logic in `conn.c:bt_conn_le_create` has changed. The changes to the logic in `conn.c` are in the following commits:89780d715d
5a09325ba9
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This commit is contained in:
parent
c104fda34f
commit
4b675f34db
4 changed files with 9 additions and 17 deletions
|
@ -327,10 +327,8 @@ if BT_SMP
|
|||
config BT_PRIVACY
|
||||
bool "Privacy Feature"
|
||||
help
|
||||
Enable Privacy Feature support. This makes it possible to generate and use
|
||||
Resolvable Private Addresses (RPAs).
|
||||
|
||||
Disabling this will remove the capability to resolve private addresses.
|
||||
Enable local Privacy Feature support. This makes it possible
|
||||
to use Resolvable Private Addresses (RPAs).
|
||||
|
||||
config BT_PRIVACY_RANDOMIZE_IR
|
||||
bool "Randomize identity root for fallback identities"
|
||||
|
|
|
@ -2834,8 +2834,7 @@ int bt_conn_le_create(const bt_addr_le_t *peer,
|
|||
create_param_setup(create_param);
|
||||
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
if (IS_ENABLED(CONFIG_BT_PRIVACY) &&
|
||||
(bt_dev.le.rl_entries > bt_dev.le.rl_size)) {
|
||||
if (bt_dev.le.rl_entries > bt_dev.le.rl_size) {
|
||||
/* Use host-based identity resolving. */
|
||||
bt_conn_set_state(conn, BT_CONN_CONNECTING_SCAN);
|
||||
|
||||
|
|
|
@ -583,12 +583,12 @@ int bt_le_create_conn_ext(const struct bt_conn *conn)
|
|||
} else {
|
||||
const bt_addr_le_t *peer_addr = &conn->le.dst;
|
||||
|
||||
if (!bt_addr_le_eq(&conn->le.resp_addr, BT_ADDR_LE_ANY)) {
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
if (bt_dev.le.rl_entries > bt_dev.le.rl_size) {
|
||||
/* Host resolving is used, use the RPA directly. */
|
||||
peer_addr = &conn->le.resp_addr;
|
||||
LOG_DBG("Using resp_addr %s", bt_addr_le_str(peer_addr));
|
||||
}
|
||||
|
||||
#endif
|
||||
bt_addr_le_copy(&cp->peer_addr, peer_addr);
|
||||
cp->filter_policy = BT_HCI_LE_CREATE_CONN_FP_NO_FILTER;
|
||||
}
|
||||
|
@ -656,12 +656,12 @@ static int bt_le_create_conn_legacy(const struct bt_conn *conn)
|
|||
} else {
|
||||
const bt_addr_le_t *peer_addr = &conn->le.dst;
|
||||
|
||||
if (!bt_addr_le_eq(&conn->le.resp_addr, BT_ADDR_LE_ANY)) {
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
if (bt_dev.le.rl_entries > bt_dev.le.rl_size) {
|
||||
/* Host resolving is used, use the RPA directly. */
|
||||
peer_addr = &conn->le.resp_addr;
|
||||
LOG_DBG("Using resp_addr %s", bt_addr_le_str(peer_addr));
|
||||
}
|
||||
|
||||
#endif
|
||||
bt_addr_le_copy(&cp->peer_addr, peer_addr);
|
||||
cp->filter_policy = BT_HCI_LE_CREATE_CONN_FP_NO_FILTER;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue