diff options
-rw-r--r-- | net/bluetooth/smp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index be8371b4eb63..a08b077cb725 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -959,7 +959,11 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb) | |||
959 | memcpy(&smp->preq[1], req, sizeof(*req)); | 959 | memcpy(&smp->preq[1], req, sizeof(*req)); |
960 | skb_pull(skb, sizeof(*req)); | 960 | skb_pull(skb, sizeof(*req)); |
961 | 961 | ||
962 | sec_level = authreq_to_seclevel(auth); | 962 | if (conn->hcon->io_capability == 0x03) |
963 | sec_level = BT_SECURITY_MEDIUM; | ||
964 | else | ||
965 | sec_level = authreq_to_seclevel(auth); | ||
966 | |||
963 | if (sec_level > conn->hcon->pending_sec_level) | 967 | if (sec_level > conn->hcon->pending_sec_level) |
964 | conn->hcon->pending_sec_level = sec_level; | 968 | conn->hcon->pending_sec_level = sec_level; |
965 | 969 | ||
@@ -1165,7 +1169,11 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) | |||
1165 | 1169 | ||
1166 | auth = rp->auth_req & AUTH_REQ_MASK; | 1170 | auth = rp->auth_req & AUTH_REQ_MASK; |
1167 | 1171 | ||
1168 | sec_level = authreq_to_seclevel(auth); | 1172 | if (hcon->io_capability == 0x03) |
1173 | sec_level = BT_SECURITY_MEDIUM; | ||
1174 | else | ||
1175 | sec_level = authreq_to_seclevel(auth); | ||
1176 | |||
1169 | if (smp_sufficient_security(hcon, sec_level)) | 1177 | if (smp_sufficient_security(hcon, sec_level)) |
1170 | return 0; | 1178 | return 0; |
1171 | 1179 | ||