buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49861, listen on a REUSEADDR socket...

 
 

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

bug #49861: listen on a REUSEADDR socket return ENOMEM while address in used

Submitted by:  Wen Xichang <wenxichang>
Submitted on:  Fri 16 Dec 2016 09:10:05 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: 2.0.1
lwIP version: 2.0.0

Sat 31 Dec 2016 02:37:20 PM UTC, comment #3:

Fixed (added function tcp_listen_with_backlog_and_err() to get the error reason when listening fails).

Thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 21 Dec 2016 02:45:40 PM UTC, comment #2:

To fix this nicely, there is no way but to change the return value of tcp_listen(). To stay backwards compatible, a new function needs to be introduced, something like this:

Anyone have an idea for a better name of this new funtion?

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 16 Dec 2016 02:44:59 PM UTC, comment #1:

Correct. Although this is unfortunately not straightforward to fix...

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 16 Dec 2016 09:10:05 AM UTC, original submission:

function tcp_listen_with_backlog return NULL in the follow condition:
1. address/port is already used
2. memory alloc failed

the caller give the same ERR_MEM error, that's not correct as expected.

Wen Xichang <wenxichang>

 

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 wenxichang (Submitted the item)
  • -unavailable- added by wenxichang
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 31 Dec 2016 02:37:20 PM UTCgoldsimonStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Fri 16 Dec 2016 02:44:59 PM UTCgoldsimonStatusNone=>In Progress
      Assigned toNone=>goldsimon
      Planned ReleaseNone=>2.0.1
    Fri 16 Dec 2016 09:10:05 AM UTCwenxichangCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1