Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Fix setting Universal/Local bit
@ 2014-01-07 12:07 Claudio Takahasi
  2014-01-07 12:07 ` [PATCH 2/2] Bluetooth: Fix 6loWPAN peer lookup Claudio Takahasi
  0 siblings, 1 reply; 3+ messages in thread
From: Claudio Takahasi @ 2014-01-07 12:07 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

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: Claudio Takahasi <claudio.takahasi@openbossa.org>
---
 net/bluetooth/6lowpan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 5f0b11d..ab4e771 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -623,7 +623,7 @@ static void set_addr(u8 *eui, u8 *addr, u8 addr_type)
 	eui[0] ^= 2;
 
 	/* Universal/local bit set, RFC 4291 */
-	if (addr_type == BDADDR_LE_PUBLIC)
+	if (addr_type == ADDR_LE_DEV_PUBLIC)
 		eui[0] |= 1;
 	else
 		eui[0] &= ~1;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-07 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 12:07 [PATCH 1/2] Bluetooth: Fix setting Universal/Local bit Claudio Takahasi
2014-01-07 12:07 ` [PATCH 2/2] Bluetooth: Fix 6loWPAN peer lookup Claudio Takahasi
2014-01-07 13:33   ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox