1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 07:51:19 +01:00

nanocoap: ensure pkt->hdr equals rbuf in coap_build_reply()

This commit is contained in:
Benjamin Valentin 2025-08-07 17:27:39 +02:00
parent d48eaf15aa
commit ec00a16c57

View File

@ -778,6 +778,9 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
ntohs(pkt->hdr->id));
len += payload_len;
/* HACK: many CoAP handlers assume that the pkt buffer is also used for the response */
pkt->hdr = (void *)rbuf;
return len;
}