Skip to content

Commit

Permalink
6lowpan: fix tag variable size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
alex.bluesman.smirnov@gmail.com authored and David S. Miller committed Jul 12, 2012
1 parent 4288404 commit abbee2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ieee802154/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit abbee2e

Please sign in to comment.