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

Submitted by:  Oleg Tyshev <olegreen>
Submitted on:  Tue 25 Aug 2009 11:48:03 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

(Jump to the original submission 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>
Project AdministratorIn charge of this item.
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>
Project Administrator
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project Administrator
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by olegreen (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 21 Oct 2009 03:16:11 PM UTCgoldsimonOpen/ClosedOpen=>Closed
      StatusIn Progress=>Fixed
    Wed 21 Oct 2009 11:41:09 AM UTCkieranmStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Fri 16 Oct 2009 09:08:36 PM UTCgoldsimonOpen/ClosedOpen=>Closed
      StatusIn Progress=>Fixed
    Fri 16 Oct 2009 02:42:25 PM UTCgoldsimonStatusNone=>In Progress
      Assigned toNone=>goldsimon
    Thu 15 Oct 2009 03:28:35 PM UTCkieranmPlanned Release1.4.0=>1.3.2
    Tue 25 Aug 2009 12:05:55 PM UTCkieranmPlanned Release=>1.4.0

    Back to the top


    Powered by Savane 3.1-cleanup1