]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Bluetooth: Incorrect address while storing LTK.
authorHemant Gupta <hemant.gupta@stericsson.com>
Fri, 23 Dec 2011 05:37:24 +0000 (11:07 +0530)
committerGustavo F. Padovan <padovan@profusion.mobi>
Fri, 23 Dec 2011 18:55:06 +0000 (16:55 -0200)
This patch fixes incorrect address storage while storing
Long Term Key for LE Devices using SMP (Security Manager Protocol).
The address stored should be of remote device and not of source device.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/smp.c

index 9fea4bfd0eb54567b711e881eb20112067b61426..32c47de303440846fce21b5c02e53c89e08e92d8 100644 (file)
@@ -820,7 +820,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb)
 
        skb_pull(skb, sizeof(*rp));
 
-       hci_add_ltk(conn->hcon->hdev, 1, conn->src, smp->smp_key_size,
+       hci_add_ltk(conn->hcon->hdev, 1, conn->dst, smp->smp_key_size,
                                                rp->ediv, rp->rand, smp->tk);
 
        smp_distribute_keys(conn, 1);