buglwIP - A Lightweight TCP/IP stack - Bugs: bug #33048, Bad range for IP source port...

 
 

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

bug #33048: Bad range for IP source port numbers (ephemeral ports)

Submitter:  Gustaf Ullberg <ullb>
Submitted:  Mon 11 Apr 2011 01:56:56 PM UTC
   
 
Category:  IPv4 Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Wed 13 Apr 2011 05:58:27 PM UTC, comment #1: 

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 11 Apr 2011 01:56:56 PM UTC, original submission:  

The ranges of the source ports for TCP and UDP lie in the IANA Registered ports range. According to IANA, this range SHOULD NOT be used. Additionally, some firewalls drop packets in this range.

Instead, the IANA recommends 49152 to 65535 as "dynamic and/or private ports".

I suggest that the macros in udp.c and tcp.c are modified:
UDP_LOCAL_PORT_RANGE_START 0xc000 // 49152
UDP_LOCAL_PORT_RANGE_END   0xffff // 65535
TCP_LOCAL_PORT_RANGE_START 0xc000 // 49152
TCP_LOCAL_PORT_RANGE_END   0xffff // 65535

According to the Wikipedia article on "Ephemeral port", most operating systems are moving to this range. FreeBSD and Windows use this range, Linux uses a similar one (32768 to 61000).

To conform to IANA rules and to avoid problems with firewalls, I think we should change the range in lwip.

References:
Mailing-list thread: http://lists.nongnu.org/archive/html/lwip-devel/2011-04/msg00004.html
Wikipedia article: http://en.wikipedia.org/wiki/Ephemeral_ports
IANA port numbers: http://www.iana.org/assignments/port-numbers

/Gustaf

Gustaf Ullberg <ullb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-13 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2011-04-11 ullb Carbon-Copy- Added ullb

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code