net: net_app: set packet data_len on incoming packets
This fixes a bug when calling net_pkt_append[_all] which uses pkt->data_len as part of the maximum packet length calculation when the net_context is set. Without this change the maximum packet length is calculated as 0 (the value of pkt->data_len) and an ENOMEM error is returned. Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This commit is contained in:
parent
e71f95b946
commit
3599d793c2
|
@ -2068,6 +2068,7 @@ reset:
|
|||
ctx->tls.mbedtls.ssl_ctx.hdr = NULL;
|
||||
}
|
||||
|
||||
pkt->data_len = len;
|
||||
ret = net_pkt_append_all(pkt, len,
|
||||
ctx->tls.request_buf,
|
||||
BUF_ALLOC_TIMEOUT);
|
||||
|
|
Loading…
Reference in a new issue