Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Dec 2000 16:09:51 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        "Mike E. Matsnev" <mike@po.cs.msu.su>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: TCP sockets connecting to tmeselves 
Message-ID:  <200012022109.eB2L9p580245@whizzo.transsys.com>
In-Reply-To: Your message of "Sat, 02 Dec 2000 23:11:39 %2B0300." <20001202231139.A4050@haali.cs.msu.ru> 
References:  <20001202231139.A4050@haali.cs.msu.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help


The TCP protocol spec specifically allows for simultaneous opens.  That is,
both connection endpoints can start the TCP state machine in SYN-SENT state
and neither starting in LISTEN state.  The behavior that you're seeing is
an effect of that.

20 years ago, there were a number of "ECHO" hosts on the ARPANET at the
time; all these things did was swap the IP source and destination addresses,
and send the packet back at you.  I was a hand way to test (then new)
TCP protocol implementations without needing another host.

> Also what rfc specifies this strange behaviour? I looked through rfc793 and didnt
> find any info about "symmetric opens". I also tried tcpdump -i lo0, and saw only
> 2 packets exchanged: one SYN and one ACK, no SYN+ACK was sent.

So the SYN was sent, and an ACK returned for the SYN.  Since both "ends"
are the same, that's all you need.  As far as the TCP stack is concerned,
it's SYN has been acked, and the connection is open.

louie


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012022109.eB2L9p580245>