zephyr/subsys/net/lib
Jukka Rissanen d88f25bd76 net: tcp: Handle special case where accepted socket is closed
Handle this corner case with TCP connection closing:

1) Client A connects, it is accepted and can send data to us
2) Client B connects, the application needs to call accept()
   before we will receive any data from client A to the application.
   The app has not yet called accept() at this point (for
   whatever reason).
3) Client B then disconnects and we receive FIN. The connection
   cleanup is a bit tricky as the client is in half-connected state
   meaning that the connection is in established state but the
   accept_q in socket queue contains still data which needs to be
   cleared.
4) Client A then disconnects, all data is sent etc

The above was not working correctly as the system did not handle the
step 3) properly. The client B was accepted in the application even
if the connection was closing.

After this commit, the commit called "net: tcp: Accept connections
only in LISTENING state" and related other commits are no longer
needed and are reverted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-28 13:58:59 +02:00
..
coap net: coap: Add internal init function to seed message_id 2019-10-04 21:22:55 +03:00
config net: lib: config: Add SYS_INIT handler to set clock from SNTP 2019-10-28 13:04:35 +02:00
conn_mgr coccinelle: standardize k_thread create/define calls with integer timeouts 2019-10-09 08:38:10 -04:00
dns net: mdns: Fix unused variable warnings 2019-10-25 13:54:55 +03:00
http net: http: client: Initial version 2019-10-04 16:38:34 +03:00
lwm2m net: lwm2m: kconfig: Remove unused firmware pull port symbol 2019-10-18 15:31:02 +03:00
mqtt net: mqtt: Remove extra documentation from individual transports 2019-10-04 18:48:10 -07:00
openthread net: openthread: Update OpenThread version 2019-10-28 13:00:56 +02:00
sntp net: lib: sntp_simple: Issue multiple requests with backoff 2019-09-13 10:40:45 +03:00
sockets net: tcp: Handle special case where accepted socket is closed 2019-10-28 13:58:59 +02:00
socks net: socks: Prefer setsockopt() API instead of legacy proxy api 2019-10-25 13:56:01 +03:00
tls_credentials license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
utils include: net: socketutils: Allow to build for CONFIG_POSIX_API 2019-09-12 17:30:29 +03:00
websocket net: websocket: client: Simple API for Websocket client 2019-10-04 16:38:34 +03:00
CMakeLists.txt net: websocket: client: Simple API for Websocket client 2019-10-04 16:38:34 +03:00
Kconfig net: websocket: client: Simple API for Websocket client 2019-10-04 16:38:34 +03:00