Skip to content
Commit 1aa3a771 authored by Rubin Gerritsen's avatar Rubin Gerritsen Committed by Christopher Friedt
Browse files

bluetooth: smp: Fix duplicate pairing_failed callback



In the case where keys are distributed on an unencrypted link,
we got the following call trace:
  - bt_smp_recv()
    - smp_error()
    - smp_pairing_complete()
      - bt_conn_security_changed()
      - smp_pairing_complete()
        - bt_auth->pairing_failed()
        - smp_reset()
      - bt_auth->pairing_failed()
      - smp_reset()

To avoid the second call to bt_auth->pairing_failed()
we validate the that smp flags before calling the callback.

Signed-off-by: default avatarRubin Gerritsen <rubin.gerritsen@nordicsemi.no>
parent f3e926b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment