eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
498 stars 374 forks source link

Block transfer resend is ignored by client, halts transfer. #555

Open pehrnord opened 3 years ago

pehrnord commented 3 years ago

https://github.com/eclipse/wakaama/blob/c5c6d321d50ff0534a390acc2bd9db7de48da41d/coap/block.c#L181

Client side: When receiving a resend of a previously handled block, it is ignored. This halts the block transfer, since the server will keep re-sending the block and then give up. Triggered when client response to block transfer message is lost (?). Should instead return COAP_231_CONTINUE?

sbernard31 commented 3 years ago

Is it possible to provide a wireshark capture to be sure that we understand the issue correctly.

qleisan commented 3 years ago

210323_555_recreation_attempt.pcapng.zip

Client side: When receiving a resend of a previously handled block, it is ignored. This halts the block transfer, since the server will keep re-sending the block and then give up. Triggered when client response to block transfer message is lost (?).

Attempted to recreate this issue without success, see attached wireshark log.

qleisan commented 3 years ago

210323_555_recreation_attempt_2.pcapng.zip

New attempt after code inspection, this time drop ACK from second (not first) block transfer packet. Problem recreated!