Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nimble/host: Update existing bond while re-pairing #1473

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

m-gorecki
Copy link
Contributor

While re-pairing ble_store_config_find_sec function was checking peer address, ediv and random number. Even if peer address was the same, the bond could be recognized as not the one we was looking for, because ediv and random number could be different. This was causing issues when the BLE_STORE_MAX_BONDS syscfg val was used. Re-pairing to the same device was treated as pairing to the new device and if current number of bonds was the same as BLE_STORE_MAX_BONDS, the re-pairing was failing.

@m-gorecki m-gorecki changed the title host/sm: Update existing bond while re-pairing nimble/host: Update existing bond while re-pairing Mar 2, 2023
continue;
}
}

if (key_sec->idx > skipped) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also not needed since we can have only one set of keys for device (unlike cccd)

also remove all unused members from ble_store_key_sec structure (everything except peer_addr)

@m-gorecki
Copy link
Contributor Author

#AutoPTS run mynewt

@codecoup-tester
Copy link

Scheduled PR ##1473 (comment) after 20:05:50.

@codecoup-tester
Copy link

Scheduled PR ##1473 (comment) after 10:08:04.

@m-gorecki m-gorecki marked this pull request as draft March 14, 2023 17:38
@m-gorecki m-gorecki force-pushed the host-fix-sec branch 2 times, most recently from 5e734c0 to 93e4832 Compare March 14, 2023 17:56
@codecoup-tester
Copy link

AutoPTS Bot results:
Failed tests:
GAP GAP/CONN/PRDA/BV-02-C BTP ERROR
GAP GAP/SEC/SEM/BV-62-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-63-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-64-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-65-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-66-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-67-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-45-C BTP ERROR
GAP GAP/SEC/AUT/BV-17-C BTP ERROR
GAP GAP/SEC/AUT/BV-21-C BTP ERROR
GAP GAP/SEC/AUT/BV-25-C INCONC - ERRATA CASE0072001
GAP GAP/SEC/AUT/BV-27-C INCONC
GAP GAP/PADV/PASE/BV-01-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-02-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-03-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-04-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PAST/BV-01-C FAIL - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/GAT/BV-12-C FAIL
GAP GAP/GAT/BV-13-C FAIL
GATT GATT/CL/GAR/BV-03-C INCONC
GATT GATT/CL/GAR/BI-06-C INCONC
GATT GATT/CL/GAR/BI-10-C INCONC
GATT GATT/CL/GAR/BI-11-C INCONC
GATT GATT/CL/GAR/BI-18-C INCONC
GATT GATT/CL/GAR/BI-19-C INCONC
GATT GATT/CL/GAR/BI-21-C INCONC
GATT GATT/CL/GAR/BI-22-C INCONC
GATT GATT/SR/GAD/BV-03-C INCONC
GATT GATT/SR/GAW/BI-33-C FAIL
L2CAP L2CAP/ECFC/BV-11-C FAIL
L2CAP L2CAP/ECFC/BV-13-C FAIL
L2CAP L2CAP/ECFC/BV-15-C FAIL
L2CAP L2CAP/ECFC/BV-43-C INCONC - ERRATA TSE18351
L2CAP L2CAP/ECFC/BV-44-C FAIL - ERRATA TSE18351
MESH MESH/NODE/TNPT/BV-05-C BTP ERROR
MESH MESH/NODE/IVU/BV-04-C INCONC - ERRATA TSE19039
MESH MESH/NODE/IVU/BI-06-C INCONC - ERRATA TSE18991 TCW1571
MESH MESH/SR/PROX/BV-03-C INCONC
MESH MESH/SR/PROX/BV-04-C INCONC
MESH MESH/SR/PROX/BV-06-C INCONC
MESH MESH/SR/PROX/BV-08-C INCONC
MESH MESH/SR/PROX/BV-09-C INCONC
MESH MESH/SR/PROX/BV-10-C INCONC
MESH MESH/SR/PROX/BV-13-C BTP TIMEOUT
MESH MESH/SR/PROX/BV-14-C INCONC
MESH MESH/NODE/CFG/HBP/BV-05-C FAIL
MESH MESH/NODE/CFG/HBS/BV-05-C FAIL
SM SM/CEN/PKE/BI-02-C FAIL
GAP GAP/SEC/SEM/BV-23-C FAIL

@m-gorecki m-gorecki force-pushed the host-fix-sec branch 4 times, most recently from a51a318 to ea4a1f0 Compare March 16, 2023 14:14
While re-pairing ble_store_config_find_sec function was checking peer address,
ediv and random number. Even if peer address was the same, the bond could be
recognized as not the one we was looking for, because ediv and random number
could be different. This was causting issues when the BLE_STORE_MAX_BONDS syscfg val
was used. Re-pairing to the same device was treated as pairing to the
new device and if current number of bonds was the same as BLE_STORE_MAX_BONDS,
the re-pairing was failing.
@m-gorecki
Copy link
Contributor Author

#AutoPTS run mynewt

@codecoup-tester
Copy link

Scheduled PR ##1473 (comment) after 10:31:06.

@m-gorecki m-gorecki marked this pull request as ready for review March 17, 2023 11:53
@codecoup-tester
Copy link

AutoPTS Bot results:
Failed tests:
GAP GAP/CONN/PRDA/BV-02-C BTP ERROR
GAP GAP/SEC/SEM/BV-62-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-63-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-64-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-65-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-66-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-67-C INCONC - ERRATA TSE18349
GAP GAP/SEC/SEM/BV-45-C FAIL
GAP GAP/SEC/AUT/BV-17-C BTP ERROR
GAP GAP/SEC/AUT/BV-21-C BTP ERROR
GAP GAP/SEC/AUT/BV-25-C BTP ERROR - ERRATA CASE0072001
GAP GAP/SEC/AUT/BV-27-C INCONC
GAP GAP/PADV/PASE/BV-01-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-02-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-03-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PASE/BV-04-C INCONC - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/PADV/PAST/BV-01-C FAIL - ERRATA https://github:com/intel/auto-pts/issues/740
GAP GAP/GAT/BV-12-C FAIL
GAP GAP/GAT/BV-13-C FAIL
GATT GATT/CL/GAR/BV-03-C INCONC
GATT GATT/CL/GAR/BI-06-C INCONC
GATT GATT/CL/GAR/BI-10-C INCONC
GATT GATT/CL/GAR/BI-11-C INCONC
GATT GATT/CL/GAR/BI-18-C INCONC
GATT GATT/CL/GAR/BI-19-C INCONC
GATT GATT/CL/GAR/BI-21-C INCONC
GATT GATT/CL/GAR/BI-22-C INCONC
GATT GATT/SR/GAD/BV-03-C INCONC
GATT GATT/SR/GAW/BI-33-C FAIL
L2CAP L2CAP/ECFC/BV-11-C FAIL
L2CAP L2CAP/ECFC/BV-13-C FAIL
L2CAP L2CAP/ECFC/BV-15-C FAIL
L2CAP L2CAP/ECFC/BV-43-C INCONC - ERRATA TSE18351
L2CAP L2CAP/ECFC/BV-44-C FAIL - ERRATA TSE18351
MESH MESH/NODE/TNPT/BV-05-C BTP ERROR
MESH MESH/NODE/IVU/BV-04-C INCONC - ERRATA TSE19039
MESH MESH/NODE/IVU/BI-06-C FAIL - ERRATA TSE18991 TCW1571
MESH MESH/SR/PROX/BV-03-C INCONC
MESH MESH/SR/PROX/BV-04-C INCONC
MESH MESH/SR/PROX/BV-06-C INCONC
MESH MESH/SR/PROX/BV-08-C INCONC
MESH MESH/SR/PROX/BV-09-C INCONC
MESH MESH/SR/PROX/BV-10-C INCONC
MESH MESH/SR/PROX/BV-13-C INCONC
MESH MESH/SR/PROX/BV-14-C FAIL
MESH MESH/NODE/CFG/HBP/BV-05-C FAIL
MESH MESH/NODE/CFG/HBS/BV-05-C FAIL
SM SM/CEN/PKE/BI-02-C FAIL
GAP GAP/SEC/SEM/BV-23-C FAIL

@andrzej-kaczmarek andrzej-kaczmarek merged commit 7cc8c08 into apache:master Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants