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: Marcel Holtmann <marcel@holtmann.org>
{
BT_DBG("conn %p", conn);
+ if (conn->auth_type == 0xff)
+ conn->auth_type = auth_type;
+
if (sec_level == BT_SECURITY_SDP)
return 1;