diff options
-rw-r--r-- | net/bluetooth/hci_conn.c | 6 | ||||
-rw-r--r-- | net/bluetooth/hci_event.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 251f22e32fbf..cf96b3438a91 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -802,12 +802,14 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
802 | 802 | ||
803 | /* An authenticated combination key has sufficient security for any | 803 | /* An authenticated combination key has sufficient security for any |
804 | security level. */ | 804 | security level. */ |
805 | if (conn->key_type == HCI_LK_AUTH_COMBINATION_P192) | 805 | if (conn->key_type == HCI_LK_AUTH_COMBINATION_P192 || |
806 | conn->key_type == HCI_LK_AUTH_COMBINATION_P256) | ||
806 | goto encrypt; | 807 | goto encrypt; |
807 | 808 | ||
808 | /* An unauthenticated combination key has sufficient security for | 809 | /* An unauthenticated combination key has sufficient security for |
809 | security level 1 and 2. */ | 810 | security level 1 and 2. */ |
810 | if (conn->key_type == HCI_LK_UNAUTH_COMBINATION_P192 && | 811 | if ((conn->key_type == HCI_LK_UNAUTH_COMBINATION_P192 || |
812 | conn->key_type == HCI_LK_UNAUTH_COMBINATION_P256) && | ||
811 | (sec_level == BT_SECURITY_MEDIUM || sec_level == BT_SECURITY_LOW)) | 813 | (sec_level == BT_SECURITY_MEDIUM || sec_level == BT_SECURITY_LOW)) |
812 | goto encrypt; | 814 | goto encrypt; |
813 | 815 | ||
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index defa1252b534..b3c5396e0c1b 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -2633,7 +2633,8 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
2633 | 2633 | ||
2634 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); | 2634 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); |
2635 | if (conn) { | 2635 | if (conn) { |
2636 | if (key->type == HCI_LK_UNAUTH_COMBINATION_P192 && | 2636 | if ((key->type == HCI_LK_UNAUTH_COMBINATION_P192 || |
2637 | key->type == HCI_LK_UNAUTH_COMBINATION_P256) && | ||
2637 | conn->auth_type != 0xff && (conn->auth_type & 0x01)) { | 2638 | conn->auth_type != 0xff && (conn->auth_type & 0x01)) { |
2638 | BT_DBG("%s ignoring unauthenticated key", hdev->name); | 2639 | BT_DBG("%s ignoring unauthenticated key", hdev->name); |
2639 | goto not_found; | 2640 | goto not_found; |