Skip to contentSkip to conversation

Bluetooth: 6lowpan: Fix multi-link setup

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Sep 20, 2017 – Sep 21, 2017

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: 6lowpan: Fix multi-link setup

From: Luiz Augusto von Dentz <[email protected]>

If there are more than one node connected and there isn't any route information attempt to check if destination address matches any of the link-local peer addresses.

---
 net/bluetooth/6lowpan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/6lowpan.c +1 -1
index 4e2576fc0c59..55370c330386 100644
@@ -190,7 +190,7 @@ static inline struct lowpan_peer *peer_lookup_dst(struct lowpan_btle_dev *dev,
 		nexthop = &lowpan_cb(skb)->gw;
 
 		if (ipv6_addr_any(nexthop))
-			return NULL;
+			nexthop = daddr;
 	} else {
 		nexthop = rt6_nexthop(rt, daddr);
 
Signature · 1 line
2.13.5
Acked-by on v1 1/1
#1 lore raw

Hi Luiz,

Quoted 18 lines · Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

If there are more than one node connected and there isn't any route information attempt to check if destination address matches any of the
link-local peer addresses.

---
 net/bluetooth/6lowpan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/6lowpan.c +0 -0
index 4e2576fc0c59..55370c330386 100644

net/bluetooth/6lowpan.c static inline struct lowpan_peer · line 196

Quoted 8 lines
net/bluetooth/6lowpan.c +1 -1
@@ -190,7 +190,7 @@ static inline struct lowpan_peer
 *peer_lookup_dst(struct lowpan_btle_dev *dev,
 		nexthop = &lowpan_cb(skb)->gw;
 
 		if (ipv6_addr_any(nexthop))
-			return NULL;
+			nexthop = daddr;
 	} else {
 		nexthop = rt6_nexthop(rt, daddr);

Cheers,
Jukka