linux/net/bluetooth
Marcel Holtmann 455c2ff0a5 Bluetooth: Fix BR/EDR out-of-band pairing with only initiator data
When only the pairing initiator is providing out-of-band data, then
the receiver side was ignoring the data. For some reason the code was
checking if the initiator has received out-of-band data and only then
also provide the required inidication that the acceptor actually has
the needed data available.

For BR/EDR out-of-band pairing it is enough if one side has received
out-of-band data. There are no extra checks needed here to make this
work smoothly. The only thing that is needed is to tell the controller
if data is present (and if it is P-192 or P-256 or both) and then let
the controller actually figure out the rest.

This means the check for outgoing connection or if the initiator has
indicated data are completely pointless and are in fact actually
causing harm. The check in question is this one:

   if (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)) {

After just taking the conditional check out and always executing the
code for determining the type of out-of-band data, the pairing works
flawlessly and prodcudes authenticated link keys.

The patch itself looks more complicated due to the reformatting of the
indentation, but it essentially just a two-line change.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2015-03-16 06:53:19 +02:00
..
bnep bluetooth: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:37 -05:00
cmtp Bluetooth: Remove dead code 2015-01-14 11:16:17 +02:00
hidp Bluetooth: hidp_connection_add() unsafe use of l2cap_pi() 2014-12-19 13:40:07 +01:00
rfcomm net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
6lowpan.c Bluetooth: 6lowpan: Remove PSM setting code 2015-01-14 22:48:13 +01:00
a2mp.c Bluetooth: Make __next_ident function static. 2015-02-15 10:14:54 +02:00
a2mp.h Bluetooth: Make __next_ident function static. 2015-02-15 10:14:54 +02:00
af_bluetooth.c Bluetooth: Convert mgmt to use HCI chan registration API 2015-03-06 20:15:21 +01:00
amp.c Bluetooth: Fix sparse warning in amp.c 2014-11-11 00:07:29 +01:00
amp.h Bluetooth: Move amp.h header file into net/bluetooth/ 2013-10-11 00:10:03 +02:00
ecc.c Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
ecc.h Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
hci_conn.c Bluetooth: Introduce hci_dev_clear_flag helper macro 2015-03-13 12:09:27 +02:00
hci_core.c Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags 2015-03-13 19:28:36 +02:00
hci_debugfs.c Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags 2015-03-13 19:28:36 +02:00
hci_debugfs.h Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
hci_event.c Bluetooth: Fix BR/EDR out-of-band pairing with only initiator data 2015-03-16 06:53:19 +02:00
hci_request.c Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags 2015-03-13 19:28:36 +02:00
hci_request.h Bluetooth: Add hci_request support for hci_update_background_scan 2014-12-19 22:06:37 +01:00
hci_sock.c Bluetooth: Send global configuration updates to all management users 2015-03-15 09:59:39 +02:00
hci_sysfs.c Bluetooth: Convert to use ATTRIBUTE_GROUPS macro 2014-02-13 09:51:34 +02:00
Kconfig Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
l2cap_core.c Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags 2015-03-13 19:28:36 +02:00
l2cap_sock.c net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
lib.c Bluetooth: Convert bt_<level> logging functions to return void 2014-09-24 09:40:08 +02:00
Makefile Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
mgmt.c Bluetooth: Add simple version of Read Local OOB Extended Data command 2015-03-15 10:05:29 +02:00
sco.c Bluetooth: fix sco_exit compile warning 2015-03-07 22:13:17 +02:00
selftest.c Bluetooth: Use %llu for printing duration details of selftests 2015-01-14 10:02:45 +02:00
selftest.h Bluetooth: Add support for self testing framework 2014-12-30 08:53:55 +02:00
smp.c Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags 2015-03-13 19:28:36 +02:00
smp.h Bluetooth: Add skeleton for SMP self-tests 2014-12-30 08:54:33 +01:00