buglwIP - A Lightweight TCP/IP stack - Bugs: bug #33818, Randomizing initial local ports

 
 

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

bug #33818: Randomizing initial local ports

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Fri 22 Jul 2011 07:20:40 PM UTC  
 
Category: TCPSeverity: 2 - Minor
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sun 11 Sep 2011 10:57:25 AM UTC, comment #3:

Fixed by adding optional code to udp_init/tcp_init that uses LWIP_RAND() to create randomized initial local ports (disabled by default).

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 04 Sep 2011 10:27:56 AM UTC, comment #2:

1: that assumption doesnt hold: lwIP Devices are allowed to make more than 64 connections.
3: As fasr as I know, ucos II is not free software (although the source code is available), so we cannot copy their algorithms

After all, I wouldn't change the port allocation strategy, I only wanted to change its starting value.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sat 03 Sep 2011 01:13:50 AM UTC, comment #1:

Hope this could give you some help:
1: assumption that the maximum connections based on lwIP is not over 64.
2: offset = newport - 0xC000 and (offset >= 0) and (offset <= 63)
3: referring to the task schedule algorithm of ucos_II to select a unused port.

tao tang <opensms4>
Fri 22 Jul 2011 07:20:40 PM UTC, original submission:

TCP and UDP currently start local ports at a defined range after booting an lwIP device. When an connection persists and a device reboots before this connection is closed, a new connection can easily reuse the same local port and a connection attempt may fail (or take long).

Does anyone care enough to randomize the initial local ports? I've done this locally for my tests, but it's not a use case for our products, so I don't have a strong opinion here...

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

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 opensms4 (Posted a comment)
  • -unavailable- added by goldsimon (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
    Sun 11 Sep 2011 10:57:25 AM UTCgoldsimonStatusNeed Info=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1