zephyr/subsys/net/lib/sockets
Robert Lubos 9cdc1bb944 net: sockets: tls: Fix TLS POLLHUP notification
The `poll()` function did not report POLLHUP if the peer ended the DTLS
session, making it impossible to detect such event on the application
side.

On the other hand, TLS erroneusely reported POLLHUP along with each
POLLIN event, as the 0 returned by the `recv()` socket call was
wrongly interpreted (it was expected to get 0 in return as 0 bytes were
requested).

Fix this by introducing a helper function to process the mbedtls context
and verify if new application data is pendingi or session has ended.
Use this new function in the poll handler, instead of a socket `recv()`
call, to remove any ambiguity in the usage, for both TLS and DTLS.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-16 18:14:33 -04:00
..
CMakeLists.txt net: socket: packet: using pckt sckt for passing the PPP dialup data 2021-04-01 09:43:56 +03:00
getaddrinfo.c net: dns: Fix multiple IP DNS resolution 2021-06-07 23:54:55 -04:00
getnameinfo.c
Kconfig net: sockets: Make NET_SOCKETS_POSIX_NAMES be on by default 2021-04-13 13:00:53 -04:00
socket_offload.c
socketpair.c net: sockets: socketpair: Rename read/write signals 2021-07-02 22:22:42 -04:00
sockets_can.c net: socket send timeout option 2021-02-24 14:16:33 +02:00
sockets_internal.h net: socket: Allow microsecond accuracy in zsock_select() 2021-06-17 15:23:13 +03:00
sockets_misc.c
sockets_net_mgmt.c
sockets_packet.c net: socket: packet: using pckt sckt for passing the PPP dialup data 2021-04-01 09:43:56 +03:00
sockets_select.c net: socket: Allow microsecond accuracy in zsock_select() 2021-06-17 15:23:13 +03:00
sockets_tls.c net: sockets: tls: Fix TLS POLLHUP notification 2021-09-16 18:14:33 -04:00
sockets.c toolchain: migrate iterable sections calls to the external API 2021-08-12 17:47:04 -04:00