diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 20:13:50 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 20:13:50 +0200 |
commit | 40be492fe4fab829951681860c2bb26fa1d5fe4a (patch) | |
tree | 41b576692c2206c9a51e689f54170076ec95bc3a /net/bluetooth/rfcomm | |
parent | f8558555f31e177e2644f3c8116801c3e5c29974 (diff) | |
download | kernel_samsung_espresso10-40be492fe4fab829951681860c2bb26fa1d5fe4a.zip kernel_samsung_espresso10-40be492fe4fab829951681860c2bb26fa1d5fe4a.tar.gz kernel_samsung_espresso10-40be492fe4fab829951681860c2bb26fa1d5fe4a.tar.bz2 |
[Bluetooth] Export details about authentication requirements
With the Simple Pairing support, the authentication requirements are
an explicit setting during the bonding process. Track and enforce the
requirements and allow higher layers like L2CAP and RFCOMM to increase
them if needed.
This patch introduces a new IOCTL that allows to query the current
authentication requirements. It is also possible to detect Simple
Pairing support in the kernel this way.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index e7a6a03..e56bcfc 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -1969,7 +1969,8 @@ static void rfcomm_auth_cfm(struct hci_conn *conn, u8 status) list_for_each_safe(p, n, &s->dlcs) { d = list_entry(p, struct rfcomm_dlc, list); - if (d->link_mode & (RFCOMM_LM_ENCRYPT | RFCOMM_LM_SECURE)) + if ((d->link_mode & (RFCOMM_LM_ENCRYPT | RFCOMM_LM_SECURE)) && + !(conn->link_mode & HCI_LM_ENCRYPT) && !status) continue; if (!test_and_clear_bit(RFCOMM_AUTH_PENDING, &d->flags)) |