Commit b071a620 authored by Claudio Takahasi's avatar Claudio Takahasi Committed by Gustavo Padovan

Bluetooth: Fix setting Universal/Local bit

This patch fixes the Bluetooth Low Energy Address type checking when
setting Universal/Local bit for the 6loWPAN network device or for the
peer device connection.

ADDR_LE_DEV_PUBLIC or ADDR_LE_DEV_RANDOM are the values allowed for
"src_type" and "dst_type" in the hci_conn struct. The Bluetooth link
type can be obtainned reading the "type" field in the same struct.
Signed-off-by: default avatarClaudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent f86772af
...@@ -623,7 +623,7 @@ static void set_addr(u8 *eui, u8 *addr, u8 addr_type) ...@@ -623,7 +623,7 @@ static void set_addr(u8 *eui, u8 *addr, u8 addr_type)
eui[0] ^= 2; eui[0] ^= 2;
/* Universal/local bit set, RFC 4291 */ /* Universal/local bit set, RFC 4291 */
if (addr_type == BDADDR_LE_PUBLIC) if (addr_type == ADDR_LE_DEV_PUBLIC)
eui[0] |= 1; eui[0] |= 1;
else else
eui[0] &= ~1; eui[0] &= ~1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment