summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-02-06 19:45:36 +0100
committerNick Pelly <npelly@google.com>2009-04-06 17:39:29 -0700
commit0424ed0523bbda223de72d59ed4d4a9fbdcd6232 (patch)
tree493bd8f8ecf2ccfaa703c4c318b51bac3c340c28 /net
parentaba8ceb77e42f273710a0ff88b6afbb87b1ade59 (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')
-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)
{
BT_DBG("conn %p", conn);
+ if (conn->auth_type == 0xff)
+ conn->auth_type = auth_type;
+
if (sec_level == BT_SECURITY_SDP)
return 1;