Skip to content

Commit

Permalink
Bluetooth: Fix skb length calculation
Browse files Browse the repository at this point in the history
When we add a fragment to a skb, len and data_len fields need to be
updated.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Gustavo Padovan authored and Gustavo Padovan committed May 16, 2012
1 parent 087bfd9 commit 2d0ed3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,9 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
sent += count;
len -= count;

skb->len += (*frag)->len;
skb->data_len += (*frag)->len;

frag = &(*frag)->next;
}

Expand Down

0 comments on commit 2d0ed3d

Please sign in to comment.