Skip to content
Commit 4a0e008e authored by Leandro Pereira's avatar Leandro Pereira Committed by Jukka Rissanen
Browse files

net: tcp: ACK packet should not be forwarded to application

Since we try to match with POSIX behavior as much as possible, let's
not bother the user unless they need to be bothered.  The recv(2) POSIX
syscall won't return 0 on stream sockets unless the connection has been
closed by the peer; however, that was happening with the callback set
by net_context_recv().

Change it so that the callback is never called if operating on a stream
socket and appdatalen is set to 0.

This is similar to a previous patch sent by Michael Scott in [1], but
not relying on the actual TCP flags: only on the appdatalen and the
socket type.

[1] https://gerrit.zephyrproject.org/r/#/c/9949/



Jira: ZEP-1632

Change-Id: Ib0c214fc9269d305a03e8d85eb606f106c45b038
Signed-off-by: default avatarLeandro Pereira <leandro.pereira@intel.com>
parent ee8bfe58
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment