diff mbox

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

Message ID 20160621082719.9903-2-aar@pengutronix.de (mailing list archive)
State Accepted
Headers show

Commit Message

Alexander Aring June 21, 2016, 8:27 a.m. UTC
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>
---
 net/6lowpan/ndisc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Stefan Schmidt June 22, 2016, 1:36 p.m. UTC | #1
Hello.

On 21/06/16 10:27, Alexander Aring wrote:
> 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>
> ---
>   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:

Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com> regards Stefan Schmidt


--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcel Holtmann June 27, 2016, 6:04 a.m. UTC | #2
Hi Alex,

> 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>
> ---
> net/6lowpan/ndisc.c | 3 +++
> 1 file changed, 3 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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: