Commit abbee2effcbce55440accb0a1dd315562875efa2

Authored by alex.bluesman.smirnov@gmail.com
Committed by David S. Miller
1 parent 428840424f

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 <alex.bluesman.smirnov@gmail.com>
Cc: Tony Cheneau <tony.cheneau@amnesiak.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/ieee802154/6lowpan.c
... ... @@ -646,7 +646,7 @@
646 646 }
647 647  
648 648 static struct lowpan_fragment *
649   -lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag)
  649 +lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u16 tag)
650 650 {
651 651 struct lowpan_fragment *frame;
652 652