coap_net.c: Include MID check in coap_pdu_cksum()

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2025-09-05 16:45:01 +01:00
1 parent da534de75e
commit b47c82535c
1 file changed
+3
+3
View File
@@ -1829,6 +1829,9 @@ coap_pdu_cksum(const coap_pdu_t *pdu, coap_digest_t *digest_buffer) {
if (!coap_digest_update(digest_ctx, (const uint8_t *)&pdu->code, sizeof(pdu->code))) {
goto fail;
}
if (!coap_digest_update(digest_ctx, (const uint8_t *)&pdu->mid, sizeof(pdu->mid))) {
goto fail;
}
if (!coap_digest_final(digest_ctx, digest_buffer))
return 0;