buglwIP - A Lightweight TCP/IP stack - Bugs: bug #46704, Fix blocking close with...

 
 

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

bug #46704: Fix blocking close with LWIP_SO_SNDTIMEO

Submitted by:  Joel Cunningham <jcunningham>
Submitted on:  Thu 17 Dec 2015 04:05:55 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Wed 13 Jan 2016 09:22:55 PM UTC, comment #2:

Don't worry about Simon, he is busy with (joyful) family things. I'll see him again at work in february, but I can't tell how much time he has for lwIP.
I'm too unexperienced with lwIP and TCPIP to dare to fix/patch complex things.

Dirk Ziegelmeier <dziegel>
Project Member
Wed 13 Jan 2016 09:06:59 PM UTC, comment #1:

Dirk,

As you seem to be the only active dev right now, mind taking a look at this?

The bug and fix (patch attached) seems really trivial to me, but I wanted someone else to take a look before submitting it.

Thanks

Joel Cunningham <jcunningham>
Project Member
Thu 17 Dec 2015 04:05:55 PM UTC, original submission:

A mis-typed comparison in lwip_netconn_do_close_internal() for the blocking close case when a memory error is encountered would end up aborting rather than blocking and retrying the close by setting the close_timeout to 0

The intention of the code was to initialize close_timeout to LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT, then over ride the value if a timeout was specified via SO_SNDTIMEO, but the comparison was >= 0 instead of > 0. 0 is the default send_timeout when the option is not used

Attached patch fixes the issue

Joel Cunningham <jcunningham>
Project Member

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dziegel (Posted a comment)
  • -unavailable- added by jcunningham (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Jan 2016 09:22:55 PM UTCdziegelStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 17 Dec 2015 04:05:55 PM UTCjcunninghamAttached File-=>Added 0001-Fix-blocking-close-with-LWIP_SO_SNDTIMEO.patch, #35779

    Back to the top


    Powered by Savane 3.1-cleanup1