]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Re-encrypt link after receiving an LTK
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 28 Feb 2014 16:10:02 +0000 (18:10 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 28 Feb 2014 16:17:46 +0000 (08:17 -0800)
commitcf535ab488095a9c609e504d3e56709de36aa14e
tree98353cfea0cd3e34c7beb6df3b5227481742f01a
parentec4f1fab56dbef05559ea9dbc4e0bf6dd210eab2
Bluetooth: Re-encrypt link after receiving an LTK

It's not strictly speaking required to re-encrypt a link once we receive
an LTK since the connection is already encrypted with the STK. However,
re-encrypting with the LTK allows us to verify that we've received an
LTK that actually works.

This patch updates the SMP code to request encrypting with the LTK in
case we're in master role and waits until the key refresh complete event
before notifying user space of the distributed keys.

A new flag is also added for the SMP context to ensure that we
re-encryption only once in case of multiple calls to smp_distribute_keys.

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