Skip to content

Commit

Permalink
sys/net/gcoap: ensure DTLS buffer is at least 200 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Apr 3, 2024
1 parent 39ba95a commit 11b4564
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/net/application_layer/gcoap/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ ifeq (2, $(words $(filter ipv4 ipv6, $(USEMODULE))))
endif

CONFIG_GCOAP_PDU_BUF_SIZE := $(or $(CONFIG_GCOAP_PDU_BUF_SIZE),128)
DTLS_MAX_BUF ?= ($(CONFIG_GCOAP_PDU_BUF_SIZE) + 36)
# the initial DTLS handshake may exceed the block size
DTLS_MAX_BUF ?= $(shell echo $$(((${CONFIG_GCOAP_PDU_BUF_SIZE} + 36) > 200 ? (${CONFIG_GCOAP_PDU_BUF_SIZE} + 36) : 200 )))

0 comments on commit 11b4564

Please sign in to comment.