From owner-freebsd-hackers Mon Jun 8 13:00:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA06591 for freebsd-hackers-outgoing; Mon, 8 Jun 1998 13:00:30 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from terra.Sarnoff.COM (terra.sarnoff.com [130.33.11.203]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA06338 for ; Mon, 8 Jun 1998 13:00:16 -0700 (PDT) (envelope-from rminnich@Sarnoff.COM) Received: (from rminnich@localhost) by terra.Sarnoff.COM (8.6.12/8.6.12) id PAA29968; Mon, 8 Jun 1998 15:58:40 -0400 Date: Mon, 8 Jun 1998 15:58:39 -0400 (EDT) From: "Ron G. Minnich" X-Sender: rminnich@terra To: Luoqi Chen cc: avalon@coombs.anu.edu.au, hackers@FreeBSD.ORG, nate@mt.sri.com Subject: Re: ECONNREFUSED on a READ? In-Reply-To: <199806081907.PAA19671@lor.watermarkgroup.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 8 Jun 1998, Luoqi Chen wrote: > > 5606 telnet CALL socket(0x2,0x2,0) > UDP socket OK, telnet is more of a mess than I thought. I just realized the same thing. So what piece of code (telnet, libtelnet, libc, ...) is creating a dgram socket and then trying to do a connect()? does that make any sense? I don't have the whole source tree handy. anybody want to look? This looks like part of dns client code from the trace. > > 5606 telnet CALL recvfrom(0x3,0xefbfd884,0x400,0,0xefbfce10,0xefbfcd7c) > > 5606 telnet RET recvfrom -1 errno 61 Connection refused > ECONNREFUSED here simply means there's no socket bound at the destination > address/port. Probably you make a mistake in your code, you meant to use > SOCK_STREAM to create a TCP socket. > Again, this is not my code. But recvfrom is perfectly OK on a dgram socket. Why ECONNREFUSED? Is this holdover state from the previous sendto? Is the connect call on a dgram socket putting the socket into a strange state? ron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message