aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index a050eee61623..c7ec47ce94e5 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2721,6 +2721,15 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
2721 2721
2722 BT_DBG("%s key_count %u", hdev->name, key_count); 2722 BT_DBG("%s key_count %u", hdev->name, key_count);
2723 2723
2724 for (i = 0; i < key_count; i++) {
2725 struct mgmt_ltk_info *key = &cp->keys[i];
2726
2727 if (key->master != 0x00 && key->master != 0x01)
2728 return cmd_status(sk, hdev->id,
2729 MGMT_OP_LOAD_LONG_TERM_KEYS,
2730 MGMT_STATUS_INVALID_PARAMS);
2731 }
2732
2724 hci_dev_lock(hdev); 2733 hci_dev_lock(hdev);
2725 2734
2726 hci_smp_ltks_clear(hdev); 2735 hci_smp_ltks_clear(hdev);