Bluetooth: Fix SSP acceptor just-works confirmation without MITM
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 9 Jun 2014 10:58:14 +0000 (13:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 18:18:25 +0000 (11:18 -0700)
commit9a5fcacabde0fe11456f4a1e88072c01846cea25
tree356ea858e65f64e59d4ed35e3db0890fb7455c2e
parent1b591538c49cf9bb29a3325d0990ccb3ac84ed8e
Bluetooth: Fix SSP acceptor just-works confirmation without MITM

commit ba15a58b179ed76a7e887177f2b06de12c58ec8f upstream.

From the Bluetooth Core Specification 4.1 page 1958:

"if both devices have set the Authentication_Requirements parameter to
one of the MITM Protection Not Required options, authentication stage 1
shall function as if both devices set their IO capabilities to
DisplayOnly (e.g., Numeric comparison with automatic confirmation on
both devices)"

So far our implementation has done user confirmation for all just-works
cases regardless of the MITM requirements, however following the
specification to the word means that we should not be doing confirmation
when neither side has the MITM flag set.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tested-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_event.c