aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-02-06 13:45:36 -0500
committerMarcel Holtmann <marcel@holtmann.org>2009-02-27 00:14:40 -0500
commit657e17b03c80bec817975984d221bef716f83558 (patch)
treea307dbea02929a8275c8c6fac5e5e95052632406 /net/bluetooth
parent0684e5f9fb9e3f7e168ab831dfca693bcb44805b (diff)
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: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7fc4c048b57b..dcdaa4be7847 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -416,6 +416,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
416{ 416{
417 BT_DBG("conn %p", conn); 417 BT_DBG("conn %p", conn);
418 418
419 if (conn->auth_type == 0xff)
420 conn->auth_type = auth_type;
421
419 if (sec_level == BT_SECURITY_SDP) 422 if (sec_level == BT_SECURITY_SDP)
420 return 1; 423 return 1;
421 424