]> 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)
commit07d8ca5bf3e82c390a925006a727c30d72189094
tree98353cfea0cd3e34c7beb6df3b5227481742f01a
parentff6a74ae756e8bb0c985682460f1a05c6f017b12
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