浏览代码

Bluetooth: Fix skb length calculation

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>
Gustavo Padovan 13 年之前
父节点
当前提交
2d0ed3d587
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/bluetooth/l2cap_core.c

+ 3 - 0
net/bluetooth/l2cap_core.c

@@ -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;
 	}