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/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned 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
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by kieranm (Updated the item)
  • -email is unavailable- added by djinng (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
    2011-03-14 goldsimon StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2011-03-14 goldsimon Assigned toNone => goldsimon
    2011-03-14 goldsimon StatusNone => In Progress
    2011-01-11 kieranm Planned Release => 1.4.1

    Back to the top


    Powered by Savane 3.5