Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 2017 17:10:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 217637] One TCP connection accepted TWO times
Message-ID:  <bug-217637-2472-DMZ14cyJr9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217637-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217637-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217637

--- Comment #33 from Michael Tuexen <tuexen@freebsd.org> ---
(In reply to slw from comment #32)
The server does
socket()
listen()
accept()
read()
write()
close()
which means it reads the first part of the request, sends the response (en
error message) and closes the socket. Then the state is FIN-WAIT-1. Then it
receives the
second part of the request. Since the socket is closed, it responds with a =
RST
segment and moves the connection to CLOSED. This covers the first TCP
connection of the two.

After that that the client retransmits the complete request, which results =
in
establishing the second TCP connection (via the syncookie processing). The
server sends a response (the same error message) and closes the socket. So =
it
is again in FIN-WAIT-1. The FIN gets acked by the client. So the server goes
into FIN-WAIT-2. Then the client sends its fin. This is processed by the se=
rver
and acked. Now the server is in TIME-WAIT. However, the ACK is not received=
 by
the client and the client retransmits the FIN-ACK.

So I don't see any end point moving into CLOSE-WAIT state...

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217637-2472-DMZ14cyJr9>