buglwIP - A Lightweight TCP/IP stack - Bugs: bug #31748, Calling non-blocking connect more...

 
 

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

bug #31748: Calling non-blocking connect more than once can render a socket useless

Submitted by:  Yoav <djinng>
Submitted on:  Thu 02 Dec 2010 01:49:40 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Mon 14 Mar 2011 09:27:16 PM UTC, comment #3:

Sorry messing with the planned release, but I just had to fix this since it mainly involves changing "FATAL" classification of error codes: ERR_USE and ERR_ISCONN just aren't fatal to me.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 14 Mar 2011 09:01:59 PM UTC, comment #2:

3. and 4. are fixed: ERR_ISCONN now translates to EALREADY (since it is only used in this case now).

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 24 Jan 2011 07:33:48 PM UTC, comment #1:

3. is correct: EALREADY should be returned. The only problem is we currently have an err_t representation for this, so it seems we need to add one.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 02 Dec 2010 01:49:40 PM UTC, original submission:

If connect is called again while a previous non-blocking connect is being processed, ERR_ISCONN is assigned to conn->err.

1. Now, if the connection succeeds, do_connected will not be able to set conn->err to ERR_OK since it checks for ERR_INPROGRESS.

2. To make things worse, ERR_ISCONN is treated as a FATAL error, and will therefore render the socket unusable.

3. According to Posix, EALREADY should be returned while a connect is in progress, and EISCONN should be returned when a socket is connected.

4. err_to_errno(ERR_ISCONN) translates to -1 instead of a valid code (e.g EISCONN)

Yoav <djinng>

 

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 (Updated the item)
  • -unavailable- added by djinng (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Mar 2011 09:27:16 PM UTCgoldsimonStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Mon 14 Mar 2011 09:01:59 PM UTCgoldsimonAssigned toNone=>goldsimon
    Mon 14 Mar 2011 09:01:58 PM UTCgoldsimonStatusNone=>In Progress
    Tue 11 Jan 2011 01:50:53 PM UTCkieranmPlanned Release=>1.4.1

    Back to the top


    Powered by Savane 3.1-cleanup1