[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #62032] Cannot have bind to INADDR_ANY on two differen
From: |
Patrik Lantto |
Subject: |
[lwip-devel] [bug #62032] Cannot have bind to INADDR_ANY on two different sockets bound to a specific netif |
Date: |
Fri, 11 Feb 2022 10:25:49 -0500 (EST) |
URL:
<https://savannah.nongnu.org/bugs/?62032>
Summary: Cannot have bind to INADDR_ANY on two different
sockets bound to a specific netif
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: patriklantto
Submitted on: 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
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.3
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 11 Feb 2022 03:25:48 PM UTC Name: SO_BINDTODEVICE.patch Size: 3KiB
By: patriklantto
<http://savannah.nongnu.org/bugs/download.php?file_id=52844>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?62032>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #62032] Cannot have bind to INADDR_ANY on two different sockets bound to a specific netif,
Patrik Lantto <=