diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-01-31 00:15:52 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-01-31 21:26:14 +0100 |
commit | 4775a4ea14d3e15645336e4b0f1355e526c57956 (patch) | |
tree | 41ecd4f3bae7e86133cdf5ee7098b9342b1ac4f1 /net/bluetooth | |
parent | 659c7fb08463b3dcf6aebb4daa0c5463289ccb97 (diff) | |
download | op-kernel-dev-4775a4ea14d3e15645336e4b0f1355e526c57956.zip op-kernel-dev-4775a4ea14d3e15645336e4b0f1355e526c57956.tar.gz |
Bluetooth: Fix OOB data present value for SMP pairing
Before setting the OOB data present flag with SMP pairing, check the
newly introduced present tracking that actual OOB data values have
been provided. The existence of remote OOB data structure does not
actually mean that the correct data values are available.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 37d9180..c09a821 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -620,7 +620,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn, oob_data = hci_find_remote_oob_data(hdev, &hcon->dst, bdaddr_type); - if (oob_data) { + if (oob_data && oob_data->present) { set_bit(SMP_FLAG_OOB, &smp->flags); oob_flag = SMP_OOB_PRESENT; memcpy(smp->rr, oob_data->rand256, 16); |