summaryrefslogtreecommitdiffstats
path: root/net/6lowpan
diff options
context:
space:
mode:
authorAlexander Aring <aar@pengutronix.de>2016-06-21 10:27:19 +0200
committerMarcel Holtmann <marcel@holtmann.org>2016-07-08 12:20:57 +0200
commit966be9e7909d616b03e644acd8a83f09bf023c5c (patch)
tree0c158bf3c786c6e659b7946e25a0f1967dd3fa30 /net/6lowpan
parent6lowpan: ndisc: fix double read unlock (diff)
downloadlinux-966be9e7909d616b03e644acd8a83f09bf023c5c.tar.xz
linux-966be9e7909d616b03e644acd8a83f09bf023c5c.zip
6lowpan: ndisc: add missing 802.15.4 only check
This patch adds a missing check to handle short address parsing for 802.15.4 6LoWPAN only. Signed-off-by: Alexander Aring <aar@pengutronix.de> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/6lowpan')
-rw-r--r--net/6lowpan/ndisc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
index 030504e031b6..79c5fa9665fc 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: