[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #52403] netconn: FIN may be sent instead of RST when T

From: Gao Qingshui
Subject: [lwip-devel] [bug #52403] netconn: FIN may be sent instead of RST when TCP netconn is closed with pending data in recv_mbox
Date: Wed, 15 Nov 2017 21:36:04 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Follow-up Comment #5, bug #52403 (project lwip):

Simon, after deleting the tcp_recved calling in netconn_drain, RESET segment
was sent instead of FIN segment, so the problem discussed previously was
fixed. But there was also two minor problems need to be noticed:
1: after RESET segment was sent, the TCP pcb should be in CLOSE state, not in
TIME_WAIT state. (Linux/FreeBSD was in CLOSE state).
2: If user use MSG_PEEK to read data, there are some data left in
sock->lastdata, function tcp_recved was called in this case. But actually
there indeed some data not recved by user per the description of RFC2525
section 2.17. As a result, FIN segment was sent, not RESET segment. 


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]