Skip to content
Commit 39328e88 authored by Sjors Hettinga's avatar Sjors Hettinga Committed by Fabio Baltieri
Browse files

net: tcp: Discard duplicate data in reodering correctly



When all the data of the new packet is already present in the
queue_recv_data, make sure the packet is discarded.
This commit adds a test line that reproduces the issue and implements a
fix.

Also in appending the packet, call the official net_buf_frag_add function
instead of updating the last net_buf pointer, since the net_pkt_remove_tail
called in between, might have removed the last net_buf.

Signed-off-by: default avatarSjors Hettinga <s.a.hettinga@gmail.com>
parent 069e0033
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment