The message reassembly function does not update the 'len' and 'data_len'
fields of the head skbuff correctly when fragments are chained to it.
This may sometimes lead to obsure errors, such as fragment reordering
when we receive fragments which are cloned buffers.
This commit fixes this, by ensuring that the two fields are updated
correctly.
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Jon Maloy <[email protected]>
Reviewed-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
(*tail)->next = frag;
*tail = frag;
(*head)->truesize += frag->truesize;
+ (*head)->data_len += frag->len;
+ (*head)->len += frag->len;
}
if (fragid == LAST_FRAGMENT) {
*fbuf = *head;