Skip to content

Commit 28766bd

Browse files
committed
BLE: Do not pass peer resolvable address in connection event handler
1 parent c3bcd10 commit 28766bd

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

features/FEATURE_BLE/ble/generic/GenericSecurityManager.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,7 @@ class GenericSecurityManager : public SecurityManager,
385385
const BLEProtocol::AddressBytes_t peer_address,
386386
BLEProtocol::AddressType_t local_address_type,
387387
const BLEProtocol::AddressBytes_t local_address,
388-
const Gap::ConnectionParams_t *connection_params,
389-
const BLEProtocol::AddressBytes_t resolved_peer_address
388+
const Gap::ConnectionParams_t *connection_params
390389
);
391390

392391
/**

features/FEATURE_BLE/ble/pal/ConnectionEventMonitor.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class ConnectionEventMonitor {
5858
const BLEProtocol::AddressBytes_t peer_address,
5959
BLEProtocol::AddressType_t local_address_type,
6060
const BLEProtocol::AddressBytes_t local_address,
61-
const ::Gap::ConnectionParams_t *connection_params,
62-
const BLEProtocol::AddressBytes_t resolved_peer_address
61+
const ::Gap::ConnectionParams_t *connection_params
6362
) = 0;
6463

6564
/**

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,7 @@ void GenericSecurityManager::on_connected(
968968
const BLEProtocol::AddressBytes_t peer_address,
969969
BLEProtocol::AddressType_t local_address_type,
970970
const BLEProtocol::AddressBytes_t local_address,
971-
const Gap::ConnectionParams_t *connection_params,
972-
const BLEProtocol::AddressBytes_t resolved_peer_address
971+
const Gap::ConnectionParams_t *connection_params
973972
) {
974973
MBED_ASSERT(_db);
975974
ControlBlock_t *cb = acquire_control_block(connection);
@@ -981,11 +980,6 @@ void GenericSecurityManager::on_connected(
981980
cb->local_address = local_address;
982981
cb->is_master = (role == Gap::CENTRAL);
983982

984-
// normalize the address
985-
if (resolved_peer_address && resolved_peer_address != ble::address_t()) {
986-
peer_address = resolved_peer_address;
987-
}
988-
989983
// get the associated db handle and the distribution flags if any
990984
cb->db_entry = _db->open_entry(peer_address_type, peer_address);
991985

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,7 @@ void nRF5xGap::on_connection(Gap::Handle_t handle, const ble_gap_evt_connected_t
13931393
peer_address,
13941394
own_addr_type,
13951395
own_address.data(),
1396-
reinterpret_cast<const ConnectionParams_t *>(&(evt.conn_params)),
1397-
peer_resolvable_address
1396+
reinterpret_cast<const ConnectionParams_t *>(&(evt.conn_params))
13981397
);
13991398
}
14001399

0 commit comments

Comments
 (0)