From: Hemant Gupta Date: Fri, 23 Dec 2011 05:37:24 +0000 (+0530) Subject: Bluetooth: Incorrect address while storing LTK. X-Git-Tag: v3.12-rc1~4060^2~13^2~6^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3573b80c42e88c2a43c068c86bcd1a753cf6e1a0;p=kernel%2Fkernel-generic.git Bluetooth: Incorrect address while storing LTK. 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 9fea4bf..32c47de 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -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);