Skip to content

Commit bda604e

Browse files
jori-nordicmbolivar-nordic
authored andcommitted
[nrf fromtree] Bluetooth: smp: Fix SC with fixed passkey
passkey confirm should not be called when secure connections are enforced. Fixes #49599 Signed-off-by: Jonathan Rico <[email protected]> Signed-off-by: Herman Berget <[email protected]> (cherry picked from commit 7db2564)
1 parent 2b8b335 commit bda604e

File tree

1 file changed

+4
-2
lines changed
  • subsys/bluetooth/host

1 file changed

+4
-2
lines changed

subsys/bluetooth/host/smp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,8 @@ static uint8_t smp_pairing_req(struct bt_smp *smp, struct net_buf *buf)
31443144
}
31453145
}
31463146

3147-
if ((DISPLAY_FIXED(smp) || smp->method == JUST_WORKS) &&
3147+
if (!IS_ENABLED(CONFIG_BT_SMP_SC_PAIR_ONLY) &&
3148+
(DISPLAY_FIXED(smp) || smp->method == JUST_WORKS) &&
31483149
!atomic_test_bit(smp->flags, SMP_FLAG_SEC_REQ) &&
31493150
smp_auth_cb && smp_auth_cb->pairing_confirm) {
31503151
atomic_set_bit(smp->flags, SMP_FLAG_USER);
@@ -3346,7 +3347,8 @@ static uint8_t smp_pairing_rsp(struct bt_smp *smp, struct net_buf *buf)
33463347
}
33473348
}
33483349

3349-
if ((DISPLAY_FIXED(smp) || smp->method == JUST_WORKS) &&
3350+
if (!IS_ENABLED(CONFIG_BT_SMP_SC_PAIR_ONLY) &&
3351+
(DISPLAY_FIXED(smp) || smp->method == JUST_WORKS) &&
33503352
atomic_test_bit(smp->flags, SMP_FLAG_SEC_REQ) &&
33513353
smp_auth_cb && smp_auth_cb->pairing_confirm) {
33523354
atomic_set_bit(smp->flags, SMP_FLAG_USER);

0 commit comments

Comments
 (0)