提交 b0dbfb46 编写于 作者: V Vinicius Costa Gomes 提交者: Johan Hedberg

Bluetooth: Add support for removing LTK's when pairing is removed

Instead of having a separated command for removing SMP keys, we use the
Remove Keys command to remove *all* keys.
Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 346af67b
...@@ -1089,6 +1089,12 @@ static int remove_keys(struct sock *sk, u16 index, void *data, u16 len) ...@@ -1089,6 +1089,12 @@ static int remove_keys(struct sock *sk, u16 index, void *data, u16 len)
bacpy(&rp.bdaddr, &cp->bdaddr); bacpy(&rp.bdaddr, &cp->bdaddr);
rp.status = MGMT_STATUS_FAILED; rp.status = MGMT_STATUS_FAILED;
err = hci_remove_ltk(hdev, &cp->bdaddr);
if (err < 0) {
err = cmd_status(sk, index, MGMT_OP_REMOVE_KEYS, -err);
goto unlock;
}
err = hci_remove_link_key(hdev, &cp->bdaddr); err = hci_remove_link_key(hdev, &cp->bdaddr);
if (err < 0) { if (err < 0) {
rp.status = MGMT_STATUS_NOT_PAIRED; rp.status = MGMT_STATUS_NOT_PAIRED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册