Skip to content
Commit 9a859739 authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: coap: fix coap packet length calculation



This calculation reads the length portion of the COAP header to determine
the length of the coap packet.  However, when encrypted via DTLS this
value seems to be getting corrupted.  Let's change this calculation so
that it will work for when DTLS is both enabled and disabled.  Use the
total length of the fragment data and substract back out the headers
to get a correct value.

Signed-off-by: default avatarMichael Scott <michael.scott@linaro.org>
parent ca642fbf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment