diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-30 02:22:24 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-30 13:28:41 -0400 |
commit | 82c295b1b07595d21e9931c58f08ccd9fa151de0 (patch) | |
tree | 27a3d9bdc978e8cfb669d7c7c8657896ccbdb851 | |
parent | b2939475eb6a3575fe542c06f3f879b93d48ae1b (diff) |
Bluetooth: Always use non-bonding requirement when not bondable
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>
-rw-r--r-- | net/bluetooth/hci_event.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index c43cee4fcffd..be35598984d9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3671,13 +3671,18 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
3671 | if (conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && | 3671 | if (conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && |
3672 | conn->auth_type != HCI_AT_NO_BONDING) | 3672 | conn->auth_type != HCI_AT_NO_BONDING) |
3673 | conn->auth_type |= 0x01; | 3673 | conn->auth_type |= 0x01; |
3674 | |||
3675 | cp.authentication = conn->auth_type; | ||
3676 | } else { | 3674 | } else { |
3677 | conn->auth_type = hci_get_auth_req(conn); | 3675 | conn->auth_type = hci_get_auth_req(conn); |
3678 | cp.authentication = conn->auth_type; | ||
3679 | } | 3676 | } |
3680 | 3677 | ||
3678 | /* If we're not bondable, force one of the non-bondable | ||
3679 | * authentication requirement values. | ||
3680 | */ | ||
3681 | if (!test_bit(HCI_BONDABLE, &hdev->dev_flags)) | ||
3682 | conn->auth_type &= HCI_AT_NO_BONDING_MITM; | ||
3683 | |||
3684 | cp.authentication = conn->auth_type; | ||
3685 | |||
3681 | if (hci_find_remote_oob_data(hdev, &conn->dst) && | 3686 | if (hci_find_remote_oob_data(hdev, &conn->dst) && |
3682 | (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags))) | 3687 | (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags))) |
3683 | cp.oob_data = 0x01; | 3688 | cp.oob_data = 0x01; |