Files
libcoap/tests
Alejandro Pacheco 7a7336aa89 coap_dtls_receive(): Stop using the TLS data after coap_handle_dgram()
Handling a received PDU can disconnect the session, for example when
the response cannot be sent and coap_send_internal() calls
coap_session_disconnected_lkd(), which closes session->tls and frees
it. After coap_handle_dgram() returned, coap_dtls_receive() in the
wolfSSL backend still cleared the pdu pointer in the freed TLS data,
and the OpenSSL backend read it through the already freed BIO.

Clear the pdu pointer before passing the decrypted data to
coap_handle_dgram() and return its result directly, as the GnuTLS
backend already does, so the TLS data is never touched once the PDU
has been handed on. Do the same before the DTLS connected event and
l_establish() on handshake completion. Mbed TLS checked session->tls
for NULL instead; give it the same structure.

Add a unit test where the server's response write fails.
2026-10-17 13:33:06 +01:00
..
2026-01-05 10:37:26 +00:00
2026-01-05 10:37:26 +00:00
2026-08-08 12:05:03 +01:00
2026-01-05 10:37:26 +00:00
2026-06-05 15:22:38 +01:00
2026-04-18 09:11:19 +01:00