From: Alexander Aring Date: Tue, 21 Jun 2016 08:27:19 +0000 (+0200) Subject: 6lowpan: ndisc: add missing 802.15.4 only check X-Git-Tag: v4.14-rc1~2816^2~129^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=966be9e7909d616b03e644acd8a83f09bf023c5c;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Stefan Schmidt Signed-off-by: Marcel Holtmann --- 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: