aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2011-04-28 06:07:54 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-28 14:02:08 -0400
commit9003c4e220c2954a53c5da0d739ed15a46c13429 (patch)
tree8459a9229d85eb2a4c90e9b9caa10f7322846d6f /net/bluetooth
parentb6020ba055c7f1ca901dc8751ecc7c9de58164db (diff)
Bluetooth: Don't modify sec_level if auth failed
If authentication fails the security level should stay as it was set before the process has started. Setting BT_SECURITY_LOW can hide real security level on a link eg. having BT_SECURITY_MEDIUM on the link, re-authenticate with failure to get BT_SECURITY_HIGH, as a result we get BT_SECURITY_LOW on the link while the real security is still medium. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index fbbb63f8a897..35f98980070c 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1459,7 +1459,6 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
1459 conn->sec_level = conn->pending_sec_level; 1459 conn->sec_level = conn->pending_sec_level;
1460 } else { 1460 } else {
1461 mgmt_auth_failed(hdev->id, &conn->dst, ev->status); 1461 mgmt_auth_failed(hdev->id, &conn->dst, ev->status);
1462 conn->sec_level = BT_SECURITY_LOW;
1463 } 1462 }
1464 1463
1465 clear_bit(HCI_CONN_AUTH_PEND, &conn->pend); 1464 clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);