]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc017e2e10d1eb2961216c2c8ce5a78dafe4efa19
tree8599aabdec9d74a3815b247cf2a2d0eb58c45826
parent40c14f62cd89064444c25e1a02ada6031829d041
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