|
@@ -2296,8 +2296,14 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
|
|
|
else
|
|
|
sec_level = authreq_to_seclevel(auth);
|
|
|
|
|
|
- if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK))
|
|
|
+ if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) {
|
|
|
+ /* If link is already encrypted with sufficient security we
|
|
|
+ * still need refresh encryption as per Core Spec 5.0 Vol 3,
|
|
|
+ * Part H 2.4.6
|
|
|
+ */
|
|
|
+ smp_ltk_encrypt(conn, hcon->sec_level);
|
|
|
return 0;
|
|
|
+ }
|
|
|
|
|
|
if (sec_level > hcon->pending_sec_level)
|
|
|
hcon->pending_sec_level = sec_level;
|