]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix incorrect clearing of SMP_FLAG_INITIATOR
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 9 Jul 2014 16:18:11 +0000 (19:18 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Jul 2014 16:23:06 +0000 (18:23 +0200)
commit79c960c417c5cda516982e7e2758f9aa7b01de14
tree75a1ac41740b8d151cc18757f2496ada4f0534f4
parent2a7478d975d8fe3fa1d099aa68835d08f10e8a05
Bluetooth: Fix incorrect clearing of SMP_FLAG_INITIATOR

When the SMP context is created all flags default to zero. To determine
that we are the initiators it's therefore best to simply change the flag
value when we know we're sending the first SMP PDU. Clearing the flag
when receiving a Pairing Request is not correct since the request may be
a response to a previous Security Request from us (for which we would
already have correctly set the flag). Same goes for receiving a Security
Request which may be coming after us already starting pairing by sending
a Pairing Request.

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