tcp_close.c:when tcp socket stays in TCP_FIN_WAIT_1 or TCP_FIN_WAIT_2,calling tcp_close_eventhandler releases received packets
when tcp socket stays in TCP_FIN_WAIT_1 or TCP_FIN_WAIT_2,not actively calling tcp_close_eventhandler,can reuslt in some TCP socket being set to a closed state,but nofosegs are not directly released,leading to IOB resource leakage. Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
parent
5c271198a9
commit
ab92b7d04d
|
@ -1629,6 +1629,12 @@ found:
|
|||
*/
|
||||
|
||||
conn->tcpstateflags = TCP_CLOSED;
|
||||
|
||||
/* In the TCP_FIN_WAIT_1, we need call tcp_close_eventhandler to
|
||||
* release nofosegs, that we received in this state.
|
||||
*/
|
||||
|
||||
tcp_callback(dev, conn, TCP_CLOSE);
|
||||
tcp_reset(dev, conn);
|
||||
return;
|
||||
}
|
||||
|
@ -1662,6 +1668,12 @@ found:
|
|||
*/
|
||||
|
||||
conn->tcpstateflags = TCP_CLOSED;
|
||||
|
||||
/* In the TCP_FIN_WAIT_2, we need call tcp_close_eventhandler to
|
||||
* release nofosegs, that we received in this state.
|
||||
*/
|
||||
|
||||
tcp_callback(dev, conn, TCP_CLOSE);
|
||||
tcp_reset(dev, conn);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue