mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
ef6fabd758
Every DTLS ClientHello from an unseen port previously allocated a dynamic CoapDtlsSession on the heap before DTLS cookie verification. This allowed multiple connection attempts to leave allocated sessions active indefinitely, leading to high memory utilization. To resolve this: - Enforce a 15-second handshake timeout on newly allocated sessions. Connecting sessions that do not successfully finish the handshake within 15 seconds are cleanly disconnected and freed. - Enforce a session limit cap of 16 concurrent secure sessions on the Border Agent. Reaching this limit immediately rejects new session connection requests before triggering heap allocation. - Implement Nexus test case TestBorderAgentSessionsLimit to robustly verify both session limit rejection and handshake timeout behavior.