Skip to content

Commit

Permalink
Bluetooth: Always use non-bonding requirement when not bondable
Browse files Browse the repository at this point in the history
When we're not bondable we should never send any other SSP
authentication requirement besides one of the non-bonding ones.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg authored and Marcel Holtmann committed Jul 30, 2014
1 parent b293947 commit 82c295b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -3671,13 +3671,18 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (conn->io_capability != HCI_IO_NO_INPUT_OUTPUT &&
conn->auth_type != HCI_AT_NO_BONDING)
conn->auth_type |= 0x01;

cp.authentication = conn->auth_type;
} else {
conn->auth_type = hci_get_auth_req(conn);
cp.authentication = conn->auth_type;
}

/* If we're not bondable, force one of the non-bondable
* authentication requirement values.
*/
if (!test_bit(HCI_BONDABLE, &hdev->dev_flags))
conn->auth_type &= HCI_AT_NO_BONDING_MITM;

cp.authentication = conn->auth_type;

if (hci_find_remote_oob_data(hdev, &conn->dst) &&
(conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)))
cp.oob_data = 0x01;
Expand Down

0 comments on commit 82c295b

Please sign in to comment.