buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27315, zero window probe and FIN

 
 

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

bug #27315: zero window probe and FIN

Submitter:  Oleg Tyshev <olegreen>
Submitted:  Tue 25 Aug 2009 11:48:03 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Jump to the original submission

Wed 21 Oct 2009 03:16:11 PM UTC, comment #7: 

Yep, I didn't think of that, thanks. Checked in:

is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);

Simon Goldschmidt <goldsimon>
Group administrator
Wed 21 Oct 2009 11:41:09 AM UTC, comment #6: 

I think the fix is nearly right, but if the packet at the head of unacked that we steal a byte from has both data and the FIN, we should send the data byte as that comes before the FIN in sequence space.  i.e. is_fin should test if there's any data bytes too, rather than just looking at the FIN flag.

Kieran Mansley <kieranm>
Group Member
Fri 16 Oct 2009 09:08:36 PM UTC, comment #5: 

Fixed by correctly sending FIN segment.

Pleas reopen if it's wrong.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 16 Oct 2009 08:43:17 PM UTC, comment #4: 

I don't really know the implementation of the zero-window-probe mechanism in lwIP (it's pretty new after all), but what happens if the remote side accepts the FIN we sent? As we still have it in the unsent queue, we would possibly send it again if later the remote side happens to send a window update. I guess that doesn't hurt since it's a retransmission?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 16 Oct 2009 05:06:28 PM UTC, comment #3: 

I suppose that in this case we should send
packet with FIN flag, but without any data.

Oleg Tyshev <olegreen>
Fri 16 Oct 2009 02:42:25 PM UTC, comment #2: 

What do you suggest, not sending a probe or sending the probe with the FIN flag included?

Changing the code is a matter of two lines after we have decided that.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 25 Aug 2009 12:05:55 PM UTC, comment #1: 

Thanks for reporting, makes sense and should be easy to fix.

Kieran Mansley <kieranm>
Group Member
Tue 25 Aug 2009 11:48:03 AM UTC, original submission:  

In function tcp_zero_window_probe()will be always taken one segment from unacked or unsent queue.
From this segment we take one byte to create zero-window probe.

Suppouse this segment has no data, only FIN flag.

In this case, instead of FIN packet would be sent  on byte of undefined data.

Oleg Tyshev <olegreen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

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 kieranm (Posted a comment)
  • -email is unavailable- added by olegreen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-21 goldsimon Open/ClosedOpen Closed
        StatusIn Progress Fixed
    2009-10-21 kieranm StatusFixed In Progress
        Open/ClosedClosed Open
    2009-10-16 goldsimon Open/ClosedOpen Closed
        StatusIn Progress Fixed
    2009-10-16 goldsimon StatusNone In Progress
        Assigned toNone goldsimon
    2009-10-15 kieranm Planned Release1.4.0 1.3.2
    2009-08-25 kieranm Planned Release 1.4.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code