Merge pull request #283 from mrdeep1/mem_leak_hello

Possible to crash coap-server with uncompleted (D)TLS handshakes
This commit is contained in:
obgm authored and GitHub committed 2018-12-18 17:45:04 +01:00
commit 49e8e43eeb
3 files changed
+36 -2

No files matched your search

+2
View File
@@ -29,6 +29,8 @@ typedef struct coap_fixed_point_t {
} coap_fixed_point_t;
#define COAP_DEFAULT_SESSION_TIMEOUT 300
#define COAP_PARTIAL_SESSION_TIMEOUT_TICKS (30 * COAP_TICKS_PER_SECOND)
#define COAP_DEFAULT_MAX_HANDSHAKE_SESSIONS 100
#define COAP_PROTO_NOT_RELIABLE(p) ((p)==COAP_PROTO_UDP || (p)==COAP_PROTO_DTLS)
#define COAP_PROTO_RELIABLE(p) ((p)==COAP_PROTO_TCP || (p)==COAP_PROTO_TLS)
+1
View File
@@ -212,6 +212,7 @@ typedef struct coap_context_t {
unsigned int session_timeout; /**< Number of seconds of inactivity after which an unused session will be closed. 0 means use default. */
unsigned int max_idle_sessions; /**< Maximum number of simultaneous unused sessions per endpoint. 0 means no maximum. */
unsigned int max_handshake_sessions; /**< Maximum number of simultaneous negotating sessions per endpoint. 0 means use default. */
unsigned int ping_timeout; /**< Minimum inactivity time before sending a ping message. 0 means disabled. */
unsigned int csm_timeout; /**< Timeout for waiting for a CSM from the remote side. 0 means disabled. */