Hi All, I am using qemu-arm running linux (guest), I start a server program on the linux(guest); then I start a program on host machine to connect to the server(on qemu linux guest) to a specified tcp port. (the qemu is started with tcp redir configuration).
Then I got a problem when the client program on host closed the tcp connection when the server is busy sending data to client. The server program will hang on close_wait state. I captured the tcp packets between the host <-> qemu and qemu<->guest linux. It seems like the connection is closed like: 1. host <-> qemu FIN --> <-- ACK <-- More data with PUSH RST --> 2. qemu <-> guest FIN --> <-- ACK <-- More data ACK --> <-- More data ACK --> ... ACK, zero window-> <- Keep-Alive ACK, zero window-> <- keep alive So, here the connection between the qemu and guest did not closed correctly. After the qemu's FIN is acked by guest os, the qemu still receives data until it's window came to be zero(which I think maybe the receive buf is filled), then it came to a zerowindow-keepalive loop, and the connection is hanging there. I checked the slirp's source code, from the packet between host and qemu, the host connection is reset, and the problem is the connection between qemu and guest is not correctly closed by slirp. I'm not sure this is a slirp bug or something else, any suggestion would be appreciated. Thanks. -Sam