Bluetooth: Fix forcing SMP just-works with no-bonding
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 9 Jul 2014 16:18:10 +0000 (19:18 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Jul 2014 16:23:06 +0000 (18:23 +0200)
Whether we bond or not should not have any impact on the user
interaction model. This patch removes an incorrect fall-back from
JUST_CFM to JUST_WORKS in case we're not bonding.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c

index a17761c838207c76a1c18b7444f474151cf680e5..a5e51c686469f97875f6123101a115caa377295c 100644 (file)
@@ -427,10 +427,6 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
        else
                method = get_auth_method(smp, local_io, remote_io);
 
-       /* If not bonding, don't ask user to confirm a Zero TK */
-       if (!(auth & SMP_AUTH_BONDING) && method == JUST_CFM)
-               method = JUST_WORKS;
-
        /* Don't confirm locally initiated pairing attempts */
        if (method == JUST_CFM && test_bit(SMP_FLAG_INITIATOR, &smp->flags))
                method = JUST_WORKS;