Date: Fri, 17 Mar 1995 12:58:49 -0500 From: "Charles M. Hannum" <mycroft@ai.mit.edu> To: terry@cs.weber.edu Cc: peter@bonkers.taronga.com, hackers@FreeBSD.org, tech-net@NetBSD.ORG Subject: Re: Batch Telnet (Re: diskless and 3Com 509) Message-ID: <199503171758.MAA28775@duality.gnu.ai.mit.edu>
next in thread | raw e-mail | index | archive | help
The message returned is "Connection closed by remote host.", not "Connection closed." And you actually believed that message? It's wrong. if (setjmp(peerdied) == 0) telnet(user); (void) NetClose(net); ExitString("Connection closed by foreign host.\n",1); The code is structured rather poorly. It ought to generate that message where it actually notices that the socket is closed. The problem is clearly that the client is getting a close before it reads the data to be displayed. Not at all. If you actually look at the packets on the wire, you'll see: 1) The client sends a FIN. 2) The server sends some data. 3) The client responds to the data with a RST. tcpdump(8) leaves no doubt that the problem, if any, is in the client. Actually, I misspoke about TCP. The client can close the write side by sending a FIN. However, the telnet client is currently closing both sides of the connection when it gets an EOF on stdin. This is really easy to fix. In fact, I just did it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503171758.MAA28775>