Commit c908df36 authored by Vinicius Costa Gomes's avatar Vinicius Costa Gomes Committed by Gustavo F. Padovan

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: default avatarVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent e9bf2bf0
...@@ -1365,13 +1365,11 @@ static int pair_device(struct sock *sk, u16 index, unsigned char *data, u16 len) ...@@ -1365,13 +1365,11 @@ static int pair_device(struct sock *sk, u16 index, unsigned char *data, u16 len)
hci_dev_lock_bh(hdev); hci_dev_lock_bh(hdev);
if (cp->io_cap == 0x03) { sec_level = BT_SECURITY_MEDIUM;
sec_level = BT_SECURITY_MEDIUM; if (cp->io_cap == 0x03)
auth_type = HCI_AT_DEDICATED_BONDING; auth_type = HCI_AT_DEDICATED_BONDING;
} else { else
sec_level = BT_SECURITY_HIGH;
auth_type = HCI_AT_DEDICATED_BONDING_MITM; auth_type = HCI_AT_DEDICATED_BONDING_MITM;
}
entry = hci_find_adv_entry(hdev, &cp->bdaddr); entry = hci_find_adv_entry(hdev, &cp->bdaddr);
if (entry) if (entry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment