From owner-freebsd-bugs Sun Mar 28 12:55:13 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id 952DD14C29 for ; Sun, 28 Mar 1999 12:55:10 -0800 (PST) (envelope-from nathan@cygnus.rush.net) Received: (from nathan@localhost) by cygnus.rush.net (8.9.3/8.9.3) id QAA29586; Sun, 28 Mar 1999 16:03:06 -0500 (EST) Date: Sun, 28 Mar 1999 16:03:04 -0500 From: Nathan Dorfman To: Bill Fumerola Cc: Chris Costello , freebsd-bugs@FreeBSD.ORG Subject: Re: kern/10826: TCP connection looped back to itself Message-ID: <19990328160303.A12377@rtfm.net> References: <199903280450.UAA36780@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Bill Fumerola on Sun, Mar 28, 1999 at 03:45:08PM -0500 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, Mar 28, 1999 at 03:45:08PM -0500, Bill Fumerola wrote: > On Sat, 27 Mar 1999, Chris Costello wrote: > > > A output of 'netstat' shows that the connection is indeed looped: > > > > > > # netstat > > > Active Internet connections > > > Proto Recv-Q Send-Q Local Address Foreign Address (state) > > > tcp 0 0 localhost.1234 localhost.1234 ESTABLISHED > > > > How is this a bug? It behaves how it should, doesn't it? > > If I understand what the submitter said, he has nothing running to accept > that connection. Confirmed. Using lsof or netstat, one can guess (on a single-user machine anyway) what the next ephemeral port will be: nathan@limbo% telnet localhost >& /dev/null & lsof -a -c telnet -i tcp COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME telnet 86705 nathan 3u inet 0xc3331f00 0t0 TCP localhost.rtfm.net:2594->localhost.rtfm.net:telnet (ESTABLISHED) nathan@limbo% telnet localhost >& /dev/null & lsof -a -c telnet -i tcp COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME telnet 86713 nathan 3u inet 0xc33324e0 0t0 TCP localhost.rtfm.net:2595->localhost.rtfm.net:telnet (ESTABLISHED) nathan@limbo% killall telnet The first two ports were 2594 and 2595, so: nathan@limbo% telnet localhost 2596 nathan@limbo:~% telnet localhost 2596 Trying 127.0.0.1... Connected to localhost.rtfm.net. Escape character is '^]'. this text is echoed this text is echoed hmmm :) hmmm :) > - bill fumerola - billf@chc-chimes.com - BF1560 - computer horizons corp - > - ph:(800) 252-2421 - bfumerol@computerhorizons.com - billf@FreeBSD.org - -- Nathan Dorfman The statements and opinions in my Unix Admin @ Frontline Communications usenet posts are mine, not FCC's. "The light at the end of the tunnel is the headlight of an approaching train." --/usr/games/fortune To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message