Thread (6 messages) 6 messages, 3 authors, 2016-06-27

[PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check

flat view
STALE3758d

From: Alexander Aring <hidden>
Date: 2016-06-21 08:27:19
Subsystem: 6lowpan generic (btle/ieee 802.15.4), networking [general], the rest · Maintainers: Alexander Aring, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

This patch adds a missing check to handle short address parsing for
802.15.4 6LoWPAN only.

Signed-off-by: Alexander Aring <redacted>
---
 net/6lowpan/ndisc.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
index 030504e..79c5fa9 100644
--- a/net/6lowpan/ndisc.c
+++ b/net/6lowpan/ndisc.c
@@ -47,6 +47,9 @@ static int lowpan_ndisc_parse_options(const struct net_device *dev,
 				      struct nd_opt_hdr *nd_opt,
 				      struct ndisc_options *ndopts)
 {
+	if (!lowpan_is_ll(dev, LOWPAN_LLTYPE_IEEE802154))
+		return 0;
+
 	switch (nd_opt->nd_opt_type) {
 	case ND_OPT_SOURCE_LL_ADDR:
 	case ND_OPT_TARGET_LL_ADDR:
-- 
2.9.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help