mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-15 22:49:16 +00:00
Fixed select not reporting received FIN as 'readable' in certain rare cases (bug #43779: select(), close(), and TCP retransmission error)
This commit is contained in:
parent
9048a7f021
commit
998ed99288
@ -6,10 +6,6 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ New features:
|
||||||
|
|
||||||
2015-02-17: Sylvain Rochet
|
|
||||||
* Large PPP rework, moved out low level protocols code (PPPoS, PPPoE, PPPoL2TP)
|
|
||||||
from PPP core code, making everything simpler.
|
|
||||||
|
|
||||||
2015-02-16: Claudius Zingerli, Sergio Caprile
|
2015-02-16: Claudius Zingerli, Sergio Caprile
|
||||||
* opt.h, dhcp.h/.c: patch #8361 "Add support for NTP option in DHCP"
|
* opt.h, dhcp.h/.c: patch #8361 "Add support for NTP option in DHCP"
|
||||||
|
|
||||||
@ -190,6 +186,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2015-02-18: Simon Goldschmidt
|
||||||
|
* sockets.c: Fixed select not reporting received FIN as 'readable' in certain
|
||||||
|
rare cases (bug #43779: select(), close(), and TCP retransmission error)
|
||||||
|
|
||||||
2015-02-17: Simon Goldschmidt
|
2015-02-17: Simon Goldschmidt
|
||||||
* err.h, sockets.c, api_msg.c: fixed bug #38853 "connect() use a wrong errno":
|
* err.h, sockets.c, api_msg.c: fixed bug #38853 "connect() use a wrong errno":
|
||||||
return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already
|
return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already
|
||||||
|
@ -730,6 +730,10 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
if (off > 0) {
|
if (off > 0) {
|
||||||
/* update receive window */
|
/* update receive window */
|
||||||
netconn_recved(sock->conn, (u32_t)off);
|
netconn_recved(sock->conn, (u32_t)off);
|
||||||
|
if (err == ERR_CLSD) {
|
||||||
|
/* closed but already received data, ensure select gets the FIN, too */
|
||||||
|
event_callback(sock->conn, NETCONN_EVT_RCVPLUS, 0);
|
||||||
|
}
|
||||||
/* already received data, return that */
|
/* already received data, return that */
|
||||||
sock_set_errno(sock, 0);
|
sock_set_errno(sock, 0);
|
||||||
return off;
|
return off;
|
||||||
|
Loading…
Reference in New Issue
Block a user