Skip to content
Commit d6ed9179 authored by Daniel Nejezchleb's avatar Daniel Nejezchleb Committed by Johan Hedberg
Browse files

net: tcp: Fix context leak during connect



Replaced tcp_out() with tcp_out_ext() when sending
SYN during tcp connect, so we can intercept error value,
beacuse in such case the packet would not be sent at all
and the stack would not trigger any mechanism to flush
this context so it ends up leaking. These scenarios can
arise when the underlaying interface is not properly
configured or is disconnected. The conn is marked to be
closed and is closed before exiting tcp_in().
Since we can now identify this case we can also exit
early in the net_tcp_connect() function and not wait
for any timeout.

Signed-off-by: default avatarDaniel Nejezchleb <dnejezchleb@hwg.cz>
parent c9a4386a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment