ed9fe70024
net/inet: Fix tcp active close in inet_close.c In previous implementation, FIN packet was not sent when a socket is actively closed (e.g. telnetd or webserver) without SO_LINGER. This issue happens because the socket closing sequence waits for the status.cl_sem only if lingering timeout is set. However, in many server use-cases, SO_LINGER is not usually set and even in these cases, FIN packet must be sent correctly. This PR changes the logic in inet_close.c so that it can wait for status.cl_sem regardless of SO_LINGER. Instead, if SO_LINGER is set, it waits for the semaphore with timeout option. Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> Approved-by: Gregory Nutt <gnutt@nuttx.org> |
||
---|---|---|
.. | ||
inet.h | ||
inet_close.c | ||
inet_globals.c | ||
inet_recvfrom.c | ||
inet_setipid.c | ||
inet_sockif.c | ||
ipv4_getpeername.c | ||
ipv4_getsockname.c | ||
ipv4_setsockopt.c | ||
ipv6_getpeername.c | ||
ipv6_getsockname.c | ||
ipv6_setsockopt.c | ||
Kconfig | ||
Make.defs |