aboutsummaryrefslogtreecommitdiff
path: root/target/arm/iwmmxt_helper.c
diff options
context:
space:
mode:
authorGavin Grant <gavingrant@protonmail.com>2018-08-30 16:57:57 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-10-07 19:50:48 +0200
commit93a972f8548571d35c718ca3a94d5ab1507b2443 (patch)
tree4fde3be9dfbce8d3c624aac01bc678bb3878b9e8 /target/arm/iwmmxt_helper.c
parent3d090aefe29846f8606d06bf55526ebb91f4d725 (diff)
slirp: Propagate host TCP RST packet to the guest after socket disconnected
Commit 27d92ebc5ed1bb0b518d0ebc4c609182ad20a799 handled the case where the TCP connection is abruptly closed via a RST packet, by checking for the ECONNRESET errno. However it does not consider the case where the connection has been half-closed by the host (FIN/ACK), then the host socket is disconnected. For example, if the host application calls close() on the socket, then the application exits. In this case, the socket still exists due to the file descriptor in SLIRP, but it is disconnected. recv() does not indicate an error since an orderly socket close has previously occurred. The socket will then be stuck in FIN_WAIT_2, until the peer sends FIN/ACK or a timeout occurs. Instead we can send a RST to the peer and transition to the CLOSED state. Signed-off-by: Gavin Grant <gavingrant@protonmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'target/arm/iwmmxt_helper.c')
0 files changed, 0 insertions, 0 deletions