[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #31748] Calling non-blocking connect more than once ca
[lwip-devel] [bug #31748] Calling non-blocking connect more than once can render a socket useless
Thu, 02 Dec 2010 13:49:40 +0000
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Summary: Calling non-blocking connect more than once can
render a socket useless
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: djinng
Submitted on: Thu 02 Dec 2010 01:49:40 PM GMT
Severity: 3 - Normal
Item Group: Faulty Behaviour
Assigned to: None
Discussion Lock: Any
lwIP version: CVS Head
If connect is called again while a previous non-blocking connect is being
processed, ERR_ISCONN is assigned to conn->err.
1. Now, if the connection succeeds, do_connected will not be able to set
conn->err to ERR_OK since it checks for ERR_INPROGRESS.
2. To make things worse, ERR_ISCONN is treated as a FATAL error, and will
therefore render the socket unusable.
3. According to Posix, EALREADY should be returned while a connect is in
progress, and EISCONN should be returned when a socket is connected.
4. err_to_errno(ERR_ISCONN) translates to -1 instead of a valid code (e.g
Reply to this item at:
Message sent via/by Savannah
|[Prev in Thread]
||[Next in Thread]|
- [lwip-devel] [bug #31748] Calling non-blocking connect more than once can render a socket useless,