]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Bluetooth: Don't modify sec_level if auth failed
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Thu, 28 Apr 2011 10:07:54 +0000 (12:07 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Thu, 28 Apr 2011 18:02:08 +0000 (15:02 -0300)
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>
net/bluetooth/hci_event.c

index fbbb63f8a8974baeb0389fba671ac5dd66934739..35f98980070cae1eacf420be2439268d733c8e0b 100644 (file)
@@ -1459,7 +1459,6 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
                        conn->sec_level = conn->pending_sec_level;
                } else {
                        mgmt_auth_failed(hdev->id, &conn->dst, ev->status);
-                       conn->sec_level = BT_SECURITY_LOW;
                }
 
                clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);