Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Use the MEDIUM security level for pairings

This lifts the requirement of 16 digits pin codes when pairing
with devices that do not support SSP when using the mgmt interface.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

authored by

Vinicius Costa Gomes and committed by
Gustavo F. Padovan
c908df36 e9bf2bf0

+3 -5
+3 -5
net/bluetooth/mgmt.c
··· 1365 1365 1366 1366 hci_dev_lock_bh(hdev); 1367 1367 1368 - if (cp->io_cap == 0x03) { 1369 - sec_level = BT_SECURITY_MEDIUM; 1368 + sec_level = BT_SECURITY_MEDIUM; 1369 + if (cp->io_cap == 0x03) 1370 1370 auth_type = HCI_AT_DEDICATED_BONDING; 1371 - } else { 1372 - sec_level = BT_SECURITY_HIGH; 1371 + else 1373 1372 auth_type = HCI_AT_DEDICATED_BONDING_MITM; 1374 - } 1375 1373 1376 1374 entry = hci_find_adv_entry(hdev, &cp->bdaddr); 1377 1375 if (entry)