diff options
-rw-r--r-- | net/bluetooth/smp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 5003d224c4b6..e76c963011e5 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1293,7 +1293,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb) authenticated, smp->tk, smp->enc_key_size, rp->ediv, rp->rand); smp->ltk = ltk; - if (!(smp->remote_key_dist & SMP_DIST_ID_KEY)) + if (!(smp->remote_key_dist & KEY_DIST_MASK)) smp_distribute_keys(smp); hci_dev_unlock(hdev); @@ -1371,7 +1371,8 @@ static int smp_cmd_ident_addr_info(struct l2cap_conn *conn, smp->id_addr_type, smp->irk, &rpa); distribute: - smp_distribute_keys(smp); + if (!(smp->remote_key_dist & KEY_DIST_MASK)) + smp_distribute_keys(smp); hci_dev_unlock(hcon->hdev); |