Skip to content
Commit 04536290 authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: ip: Fix 6lo buffer leak when sending ACK



Due to recent TCP fixes for 6lo, we are making a copy of buffers
sent to net_tcp_send_buf() so that TCP retransmit can send the original
(unmodified) buffer.  This original buffer is freed via the TCP
sent_list when the related ACK packet is received.

However, there are users of the net_tcp_send_buf() function which
will never get a corresponding ACK (and do not add the buffer to the
TCP sent_list).  An example is send_ack() in net_context.c.  In this
case, we leak the original buffer.

To fix this leak in the 6lo specific block of net_tcp_send_buf(),
let's check to see if the original buffer was added to the TCP sent_list
and if not, then avoid the buffer copy process entirely.

Change-Id: If99e0e5bf266d33dd3466dc5d74443eaa39d10a8
Signed-off-by: default avatarMichael Scott <michael.scott@linaro.org>
parent bed2f431
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment