patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9624, TFTP server check block number of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9624: TFTP server check block number of DATA packets

Submitted by:  Jens Nielsen <deft>
Submitted on:  Tue 24 Apr 2018 06:19:20 PM UTC  
 
Category:  apps Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Simon Goldschmidt <goldsimon> Open/Closed:  Closed
Planned Release:  None

Wed 25 Apr 2018 06:31:04 PM UTC, comment #2: 

The first one is better since it works for files > 32 mbytes (after a tiny fix that casts (blknum+1) to u16_t).

Pushed, thanks for the patch.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 25 Apr 2018 03:44:21 PM UTC, comment #1: 

Hi,
I came across the same problem and just wanted to commit a patch for the same problem. Don't know which patch is the better one, as both do an ACT retransmit in the case the sequence number is the same already received.

(file #44029)

Malte <malte>
Tue 24 Apr 2018 06:19:20 PM UTC, original submission:  

In a write transfer to the TFTP server, if the ack sent by lwip gets lost (or as in my case the application stalls when writing/erasing the internal flash and I can't send the ack in time) the client may retransmit the previous data packet. The current implementation will happily forward the same data again to the application which of course doesn't work.

Here's a simple fix to keep track of the block number also for writes and just retransmit the ack if the previous block number arrives.

Jens Nielsen <deft>

 

Attached Files
file #44029:  tftp_serverPackets.patch added by malte (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by malte (Updated the item)
  • -email is unavailable- added by deft (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-25 goldsimon StatusNone => Done
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed
    2018-04-25 malte Attached File- => Added tftp_serverPackets.patch, #44029
    2018-04-24 deft Attached File- => Added 0001-TFTP-server-handle-retransmit-Data-packets.patch, #44008

    Back to the top


    Powered by Savane 3.5