From: alex.bluesman.smirnov@gmail.com Date: Tue, 10 Jul 2012 21:22:47 +0000 (+0000) Subject: 6lowpan: fix tag variable size X-Git-Tag: firefly_0821_release~3680^2~2381^2~201 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=abbee2effcbce55440accb0a1dd315562875efa2;p=firefly-linux-kernel-4.4.55.git 6lowpan: fix tag variable size Function lowpan_alloc_new_frame() takes u8 tag as an argument. However, its only caller, lowpan_process_data() passes down a u16. Hence, the tag value can get corrupted. This prevent 6lowpan fragment reassembly of a message when the fragment tag value is over 256. Signed-off-by: Alexander Smirnov Cc: Tony Cheneau Signed-off-by: David S. Miller --- diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index ae3f4eb02064..2e790fbe848d 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -646,7 +646,7 @@ static void lowpan_fragment_timer_expired(unsigned long entry_addr) } static struct lowpan_fragment * -lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag) +lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u16 tag) { struct lowpan_fragment *frame;