提交 657e17b0 编写于 作者: M Marcel Holtmann

Bluetooth: Set authentication requirements if not available

When no authentication requirements are selected, but an outgoing or
incoming connection has requested any kind of security enforcement,
then set these authentication requirements.

This ensures that the userspace always gets informed about the
authentication requirements (if available). Only when no security
enforcement has happened, the kernel will signal invalid requirements.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 0684e5f9
...@@ -416,6 +416,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) ...@@ -416,6 +416,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{ {
BT_DBG("conn %p", conn); BT_DBG("conn %p", conn);
if (conn->auth_type == 0xff)
conn->auth_type = auth_type;
if (sec_level == BT_SECURITY_SDP) if (sec_level == BT_SECURITY_SDP)
return 1; return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册