From: Johan Hedberg Date: Fri, 18 Jun 2010 08:08:56 +0000 (+0300) Subject: Bluetooth: Reset the security level after an authentication failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da213f41cdd445d3df468f8fe7f24fe4f4c48508;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Bluetooth: Reset the security level after an authentication failure 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 6c57fc71c7e..786b5de0bac 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -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);