Skip to content

Commit

Permalink
Bluetooth: Reset the security level after an authentication failure
Browse files Browse the repository at this point in the history
When authentication fails for a connection the assumed security level
should be set back to BT_SECURITY_LOW so that subsequent connect
attempts over the same link don't falsely assume that security is
adequate enough.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg authored and Marcel Holtmann committed Jul 8, 2010
1 parent e501d05 commit da213f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,8 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
if (conn) {
if (!ev->status)
conn->link_mode |= HCI_LM_AUTH;
else
conn->sec_level = BT_SECURITY_LOW;

clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);

Expand Down

0 comments on commit da213f4

Please sign in to comment.