Commit 88644bb9 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo F. Padovan

Revert "Bluetooth: Update sec_level/auth_type for already existing connections"

This reverts commit 04530982. That
commit is wrong for two reasons:

- The conn->sec_level shouldn't be updated without performing
authentication first (as it's supposed to represent the level of
security that the existing connection has)

- A higher auth_type value doesn't mean "more secure" like the commit
seems to assume. E.g. dedicated bonding with MITM protection is 0x03
whereas general bonding without MITM protection is 0x04. hci_conn_auth
already takes care of updating conn->auth_type so hci_connect doesn't
need to do it.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@nokia.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 683d949a
...@@ -382,11 +382,6 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 ...@@ -382,11 +382,6 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
acl->sec_level = sec_level; acl->sec_level = sec_level;
acl->auth_type = auth_type; acl->auth_type = auth_type;
hci_acl_connect(acl); hci_acl_connect(acl);
} else {
if (acl->sec_level < sec_level)
acl->sec_level = sec_level;
if (acl->auth_type < auth_type)
acl->auth_type = auth_type;
} }
if (type == ACL_LINK) if (type == ACL_LINK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment