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:Leandro Pereira <leandro.pereira@intel.com>
Loading
Please sign in to comment