zephyr/subsys/net
Michael Scott a96fbc8167 net: tcp: fix NET_TCP_CLOSED state propagatation
In net_tcp_release() when a TCP connection is being closed, we
should call net_tcp_change_state instead of net_tcp_set_state.

net_tcp_change_state() will call into net_tcp_set_state() but
also contains logic specific to NET_TCP_CLOSED which unregisters
the context's conn_handler and sends an accept callback (if
present) with -ENETRESET error for user code to handle.

This fixes an EISCONN error returned by net_context_bind() when
a TCP-based net_context was reused.  Due to the conn_handler
not being cleaned up in the TCP code.

Change-Id: I8439a028a1c7ae5fd2a50d11caa9947a0ac6c7d4
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-03-09 20:33:47 +02:00
..
ip net: tcp: fix NET_TCP_CLOSED state propagatation 2017-03-09 20:33:47 +02:00
lib lib/zoap: Fix warning about signedness conversion 2017-03-09 20:33:40 +02:00
buf.c net: buf: Add more accounting info to net_buf pool 2017-03-09 20:33:42 +02:00
Kconfig net: buf: Add more accounting info to net_buf pool 2017-03-09 20:33:42 +02:00
Makefile net: Restructure network protocols 2017-01-02 10:03:19 +01:00
TODO net: todo: Remove TCP from TODO 2017-03-09 20:33:45 +02:00