ieee802154: 6lowpan: add generic lowpan header check
authorAlexander Aring <alex.aring@gmail.com>
Wed, 2 Sep 2015 12:21:26 +0000 (14:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Sep 2015 11:20:03 +0000 (13:20 +0200)
commitfaf7d36e5ecd16ab090c82d14bff31f7ab2f70e6
tree8599aabdec9d74a3815b247cf2a2d0eb58c45826
parent72a5e6bb5120d6464c9e7855c5a22555ede819dc
ieee802154: 6lowpan: add generic lowpan header check

This patch introduce an earlier check if a 6LoWPAN frame can be valid.
This contains at first for checking if the header contains a dispatch
byte and isn't the nalp dispatch value, which means it isn't a 6LoWPAN
packet. Also we add a check if we can derference the dispatch value by
checking if skb->len is unequal zero.

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/6lowpan/rx.c