]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Fix 6loWPAN peer lookup
authorClaudio Takahasi <claudio.takahasi@openbossa.org>
Tue, 7 Jan 2014 12:07:48 +0000 (09:07 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 7 Jan 2014 13:32:15 +0000 (11:32 -0200)
This patch fixes peer address lookup for 6loWPAN over Bluetooth Low
Energy links.

ADDR_LE_DEV_PUBLIC, and ADDR_LE_DEV_RANDOM are the values allowed for
"dst_type" field in the hci_conn struct for LE links.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/6lowpan.c

index ab4e7712457b2e1020ed8de715ff67b30157a86e..adb3ea04adaaa73d3faf4db783f096e91e93321e 100644 (file)
@@ -439,9 +439,9 @@ static void get_dest_bdaddr(struct in6_addr *ip6_daddr,
        /* Set universal/local bit to 0 */
        if (addr->b[5] & 1) {
                addr->b[5] &= ~1;
-               *addr_type = BDADDR_LE_PUBLIC;
+               *addr_type = ADDR_LE_DEV_PUBLIC;
        } else {
-               *addr_type = BDADDR_LE_RANDOM;
+               *addr_type = ADDR_LE_DEV_RANDOM;
        }
 }