diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-05-23 13:36:10 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-12-03 16:51:15 +0100 |
commit | 8f5eeca321b4a618550a0c4c2d3da935aa7073b0 (patch) | |
tree | 3c276feb422fe2cf030b5ab06115a518a6ae4afd | |
parent | 23fb8de376181a30c35195351ec6230167098b48 (diff) | |
download | linux-8f5eeca321b4a618550a0c4c2d3da935aa7073b0.tar.gz linux-8f5eeca321b4a618550a0c4c2d3da935aa7073b0.tar.bz2 linux-8f5eeca321b4a618550a0c4c2d3da935aa7073b0.zip |
Bluetooth: Set the correct security level for SC LTKs
When the looked-up LTK is one generated by Secure Connections pairing
the security level it gives is BT_SECURITY_FIPS. This patch updates the
LTK request event handler to correctly set this level.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/smp.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h index 81d24c0ea08b..f955d6b7ceb2 100644 --- a/net/bluetooth/smp.h +++ b/net/bluetooth/smp.h @@ -163,8 +163,12 @@ static inline bool smp_ltk_is_sc(struct smp_ltk *key) static inline u8 smp_ltk_sec_level(struct smp_ltk *key) { - if (key->authenticated) - return BT_SECURITY_HIGH; + if (key->authenticated) { + if (smp_ltk_is_sc(key)) + return BT_SECURITY_FIPS; + else + return BT_SECURITY_HIGH; + } return BT_SECURITY_MEDIUM; } |