* TCPv4 State Transition questions
@ 2001-09-17 23:20 Bhavesh P. Davda
0 siblings, 0 replies; only message in thread
From: Bhavesh P. Davda @ 2001-09-17 23:20 UTC (permalink / raw)
To: linux-kernel
Here's what's going on...
client & server on two separate hosts, running 2.2.17 kernel.
1. client <-> server connection in ESTABLISHED state
2. kill -TERM server; respawn server
3. client does select(), gets read event, reads 0 bytes
4. client closes socket
5. client creates new socket, tries non-blocking connect()
6. client gets EINPROGRESS, puts socket on write set, does select
7. select says write event
8. client does getsockopt(SOL_SOCKET, SO_ERROR), gets 0
9. client puts socket on read set, does select
10.client gets read event, reads 0 bytes
11.client repeats sequence of steps from step 4.
Running tcpdump on the server end, this is what I see:
a. server -> client: FIN,ACK
b. client -> server: ACK (of FIN)
c. client -> server: FIN, ACK (of FIN again)
d. server -> client: ACK (of client FIN)
e. client -> server: SYN (new src port)
f. server -> client: RST, ACK
e. & f. repeat forever...
Questions:
1. Why did I get a writable event on select, and the getsockopt telling
me that connect() succeeded, when the SYN, SYN-ACK, ACK handshake has
not completed?
2. Why right after that did I get a readable event on the "connected"
socket, telling me that there was EOF to read?
3. Why is the server sending RSTs back to the client, when the client is
trying to connect to the server from different TCP ports every time? The
new server's socket is in LISTEN state, yet I see this happening.
- Bhavesh
--
Bhavesh P. Davda
Avaya Inc
Room B3-B16 E-mail : bhavesh@avaya.com
1300 West 120th Avenue Phone : (303) 538-4438
Westminster, CO 80234 Fax : (303) 538-3155
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-09-17 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-17 23:20 TCPv4 State Transition questions Bhavesh P. Davda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox