Hi guys !
I am running 2.6.13-15-smp kernel and keep receiving client resets in
the following scenario:
Simple server who does active close after replying with client text
message.
Simple client opening socket, sending a client msg, receiving reply and
then closing socket passively.
Both client and server reuse the same address via socket option.
When I run the client in a tight loop three times, then the client
issues a reset to the server.
Here is my tcpdump output:
// CLIENT_OPEN_2
15:47:58.985520 IP client.4242 > server.6666: S
3069231354:3069231354(0) win 5840 <mss 1460,sackOK,timestamp 5237162
0,nop,wscale 2>
15:47:58.985698 IP server.6666 > client.4242: S
2461888691:2461888691(0) ack 3069231355 win 5792 <mss
1460,sackOK,timestamp 4325982 5237162,nop,wscale 6>
15:47:58.985712 IP client.4242 > server.6666: . ack 2461888692 win 1460
<nop,nop,timestamp 5237162 4325982>
// CLIENT_PUSH_2
15:47:59.026361 IP client.4242 > server.6666: P
3069231355:3069231366(11) ack 2461888692 win 1460 <nop,nop,timestamp
5237172 4325982>
15:47:59.026544 IP server.6666 > client.4242: . ack 3069231366 win 91
<nop,nop,timestamp 4325993 5237172>
15:47:59.026614 IP server.6666 > client.4242: P
2461888692:2461888710(18) ack 3069231366 win 91 <nop,nop,timestamp
4325993 5237172>
15:47:59.027152 IP server.6666 > client.4242: . ack 3069231367 win 91
<nop,nop,timestamp 4325993 5237172>
// SERVER_CLOSE_2
15:47:59.026620 IP server.6666 > client.4242: F
2461888710:2461888710(0) ack 3069231366 win 91 <nop,nop,timestamp
4325993 5237172>
15:47:59.026780 IP client.4242 > server.6666: . ack 2461888710 win 1460
<nop,nop,timestamp 5237172 4325993>
15:47:59.026978 IP client.4242 > server.6666: F
3069231366:3069231366(0) ack 2461888711 win 1460 <nop,nop,timestamp
5237172 4325993>
// CLIENT_OPEN_3
15:47:59.027279 IP client.4242 > server.6666: S
3069273114:3069273114(0) win 5840 <mss 1460,sackOK,timestamp 5237172
0,nop,wscale 2>
// timestamp of client's new SYN = timestamp of client's last FIN
// ==> server stack resends the ACK
15:47:59.027487 IP server.6666 > client.4242: . ack 3069231367 win 91
<nop,nop,timestamp 4325993 5237172>
// This ack does not match the client's current seq-nr => client sends
a RESET
15:47:59.027497 IP client.4242 > server.6666: R
3069231367:3069231367(0) win 0
// Then the client retries roughly 3 secs later
15:48:02.024980 IP client.4242 > server.6666: S
3069273114:3069273114(0) win 5840 <mss 1460,sackOK,timestamp 5237922
0,nop,wscale 2>
I have noticed that the timestamp of client's new SYN = timestamp of
client's last FIN. Is the reason why the server resends the ACK, which
then apparently causes the client to send the RESET ?
Your help is appreciated,
Matthias
|