From 252f8fefe03db52f52fe8cecbb0029f265d6311b Mon Sep 17 00:00:00 2001 From: Seppo Takalo Date: Thu, 8 May 2025 16:40:30 +0300 Subject: [PATCH] net: lwm2m: Fix blockwise Ack NUM calculation After the PR #85000 the calculation of NUM field of Block 1 option on CoAP Ack packet started to advance to next packet block. We should not update the ctx->current field because it is used for calculating the NUM field in response packet. It should point to beginning of the payload, so the response is correct. Leshan server don't seem to care about this, but Coiote does. Signed-off-by: Seppo Takalo --- subsys/net/lib/lwm2m/lwm2m_message_handling.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/subsys/net/lib/lwm2m/lwm2m_message_handling.c b/subsys/net/lib/lwm2m/lwm2m_message_handling.c index 1725661fe17..cd3957b7704 100644 --- a/subsys/net/lib/lwm2m/lwm2m_message_handling.c +++ b/subsys/net/lib/lwm2m/lwm2m_message_handling.c @@ -1057,9 +1057,6 @@ static int lwm2m_write_handler_opaque(struct lwm2m_engine_obj_inst *obj_inst, return ret; } } - if (msg->in.block_ctx && !last_pkt_block) { - msg->in.block_ctx->ctx.current += len; - } opaque_ctx.offset += len; written += len; }