Re: TCP socket close problem
- From: Staffan Ulfberg <staffan@xxxxxxxxxx>
- Date: 18 Jun 2006 18:59:13 +0200
per@xxxxxxxxxxxx (Per Hedeland) writes:
In article <87wtbhqkoi.fsf@xxxxxxxxxxxxxxxxxxxxx> Staffan Ulfberg
<staffan@xxxxxxxxxx> writes:
Your issue probably has nothing to do with FreeBSD specifically, but
people seem to post here about all kinds of things they run into while
they just happen to be running FreeBSD...
You're probably right, and therefore I'm somewhat reluctant to post
here, but I've used up far too much time on network issues lately and
do not know any better forum:(
It should transition to CLOSE_WAIT on receipt of FIN, and be deleted
altogether on receipt of RST AFAIK.
[...]
Well, theoretically, unless you use non-blocking I/O, your code be
blocked on send() and so never get to notice the arriving FIN via
select()/recv() (I prefer to use write()/read() on TCP sockets btw, but
I don't think that makes any difference). But I assume you would have
noticed that in your trace output, and the packet trace has other
info...
[...]
It seems clear that the server is seeing neither FIN nor RST - if it had
seen the FIN it should be ACK'ingwith 119, not 118, and if it had seen
the RST it certainly shouldn't send more data. It also seems that the
client isn't seeing the retransmits from the server, since it should
respond with RST to those (of course it may have been disconnected...).
Right. So indeed it looks like the server doesn't really see the
incoming FIN/RST at all.
Last time I believe you had a broken NAT device that corrupted the TCP
checksum, I suppose you have ruled out any similar (or even same)
problem now?:-) And I assume the trace is done on the server? Any local
firewall on it, that could possibly block the FIN/RST from being
delivered to the TCP/IP stack even though tcpdump sees them?
And yes, the trace is on the server, behind the broken firewall
(which, BTW, now runs an older firmware that does not seem to have the
bug discovered last time -- at least not the exact same bug...). No
local firewall.
I've now compared dumps from both inside and outside the firewall, and
I can detect no difference. I will of course try removing the
firewall completely, just in case there's something I'm missing in the
traces.
If this eventually turns out to be related to that firewall box again,
I promise it will be disconnected, dismantled, and permanently
prevented from ever seeing an IP fragment again! :)
Staffan
.
- Follow-Ups:
- Re: TCP socket close problem
- From: Staffan Ulfberg
- Re: TCP socket close problem
- From: Per Hedeland
- Re: TCP socket close problem
- References:
- TCP socket close problem
- From: Staffan Ulfberg
- Re: TCP socket close problem
- From: Per Hedeland
- TCP socket close problem
- Prev by Date: Re: IPFIREWALL or PF
- Next by Date: Re: IPFIREWALL or PF
- Previous by thread: Re: TCP socket close problem
- Next by thread: Re: TCP socket close problem
- Index(es):
Relevant Pages
|