diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index d56dfcb9bc5..3b1bedd6347 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -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; }