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:Handled error return value BLE_ERR_UNK_CONN_ID when encryption is enabled without distributing IRK. #1620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ESPAbhinav
Copy link
Contributor

If address resolution is enabled in the controller it will reject any RL modification during scanning, adv, etc. Hence controller sends a Command disallowed error which needs to be sent back to the application. Also when encryption is enabled without distributing IRK and hence the controller has no IRK but the host has LTK then the controller will return error 0x202 which needs not to be returned to delete LTK. (Hence it is skipped to return when the error code is 0 or 0x202.)

…ption is enabled without distributing IRK and hence controller has no IRK but host has LTK.

If address resolution is enabled in the controller it will reject any RL modification during scanning, adv, etc.
Hence controller sends a Command disallowed error which needs to be sent back to the application.
Also when encryption is enabled without distributing IRK and hence the controller has no IRK
but the host has LTK then the controller will return error 0x202 which
needs not to be returned to delete LTK. (Hence it is skipped to return when the error code is 0 or 0x202.)
Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

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

code looks OK but could you make commit message match convention?

commit message and topic should fit in 72 lines (if possible)
topic : "nimble/host:Handled error return value BLE_ERR_UNK_CONN_ID"

and then commit message (new lines at <72 chars)
"When encryption is enabled without distributing IRK and hence controller
has no IRK but host has LTK. If address resolution is enabled in the
controller it will reject any RL ......"

This is mainly for keeping 'git log' consitent

@ESPAbhinav
Copy link
Contributor Author

Sure.Thanks for this suggestion. I will follow commit conventions and change the commit message.

@@ -6062,6 +6063,9 @@ ble_gap_unpair(const ble_addr_t *peer_addr)

ble_hs_pvcy_remove_entry(peer_addr->type,
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like return value from ble_hs_pvcy_remove_entry() is never stored in rc...

Copy link

Choose a reason for hiding this comment

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

Thanks for your suggestion. So I have made further changes including above mentioned in this API and will update this PR.

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

3 participants