net: tcp: Invalid transition from FIN_WAIT_1 to CLOSE_WAIT
We incorrectly changed the state from FIN_WAIT_1 to CLOSE_WAIT. This caused ACK be sent in CLOSE_WAIT state when the connection was closed by peer. Sending ACK in this state is not allowed according to RFC. The connection was still closed but slightly wrong way. Jira: ZEP-1961 Change-Id: Ie4aa6818128d4190230b679e26ac9630c7d45d69 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
4de6340fe9
commit
b3e5de641d
1 changed files with 4 additions and 1 deletions
|
@ -833,7 +833,10 @@ NET_CONN_CB(tcp_established)
|
|||
* LAST_ACK state
|
||||
*/
|
||||
context->tcp->fin_rcvd = 1;
|
||||
net_tcp_change_state(context->tcp, NET_TCP_CLOSE_WAIT);
|
||||
|
||||
if (net_tcp_get_state(context->tcp) == NET_TCP_ESTABLISHED) {
|
||||
net_tcp_change_state(context->tcp, NET_TCP_CLOSE_WAIT);
|
||||
}
|
||||
|
||||
context->tcp->send_ack += 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue