diff options
author | Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> | 2011-04-28 06:07:55 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-04-28 14:02:12 -0400 |
commit | 13d39315c22b128f4796fc008b04914a7c32bb1a (patch) | |
tree | 81f6ed817d6814ba2af5c0bf8a6b7ede9999a395 /net/bluetooth/hci_event.c | |
parent | 9003c4e220c2954a53c5da0d739ed15a46c13429 (diff) |
Bluetooth: Map sec_level to link key requirements
Keep the link key type together with connection and use it to
map security level to link key requirements. Authenticate and/or
encrypt connection if the link is insufficiently secure.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 35f98980070c..655af8bc60e2 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -2095,6 +2095,10 @@ static inline void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff | |||
2095 | hci_conn_hold(conn); | 2095 | hci_conn_hold(conn); |
2096 | conn->disc_timeout = HCI_DISCONN_TIMEOUT; | 2096 | conn->disc_timeout = HCI_DISCONN_TIMEOUT; |
2097 | pin_len = conn->pin_length; | 2097 | pin_len = conn->pin_length; |
2098 | |||
2099 | if (ev->key_type != HCI_LK_CHANGED_COMBINATION) | ||
2100 | conn->key_type = ev->key_type; | ||
2101 | |||
2098 | hci_conn_put(conn); | 2102 | hci_conn_put(conn); |
2099 | } | 2103 | } |
2100 | 2104 | ||