Skip to content

Commit 1abf21e

Browse files
committed
Revert "Revert "Bluetooth: Always request for user confirmation for Just Works (LE SC)""
This reverts commit eaeca89.
1 parent eab19e7 commit 1abf21e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/bluetooth/smp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
22142214
if (err)
22152215
return SMP_UNSPECIFIED;
22162216

2217-
if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
2217+
if (smp->method == REQ_OOB) {
22182218
if (hcon->out) {
22192219
sc_dhkey_check(smp);
22202220
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
@@ -2229,6 +2229,9 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
22292229
confirm_hint = 0;
22302230

22312231
confirm:
2232+
if (smp->method == JUST_WORKS)
2233+
confirm_hint = 1;
2234+
22322235
err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
22332236
hcon->dst_type, passkey, confirm_hint);
22342237
if (err)

0 commit comments

Comments
 (0)