buglwIP - A Lightweight TCP/IP stack - Bugs: bug #62032, Cannot have bind to INADDR_ANY on...

 
 

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

bug #62032: Cannot have bind to INADDR_ANY on two different sockets bound to a specific netif

Submitter:  Patrik Lantto <patriklantto>
Submitted:  Fri 11 Feb 2022 03:25:48 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.3

Fri 11 Feb 2022 03:25:48 PM UTC, original submission:  

If two sockets are bound to different netifs (e.g. using SO_BINDTODEVICE), bind will return an error (EADDRINUSE) if INADDR_ANY and the same port is used. This should only be the case if any of the sockets are not bound to a specific netif (or if they are bound to the same netif).

The attached patch will consider netif_idx in the loop validating the address in tcp_bind, tcp_listen, tcp_connect and udp_bind.

Patrik Lantto <patriklantto>

 

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

Attached Files
file #52844:  SO_BINDTODEVICE.patch added by patriklantto (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by patriklantto (Submitted the item)
  •  

    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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-11 patriklantto Attached File- Added SO_BINDTODEVICE.patch, #52844

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code