From owner-freebsd-hackers Wed Mar 31 3:57: 2 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cdsec.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id D305714D96 for ; Wed, 31 Mar 1999 03:54:48 -0800 (PST) (envelope-from gram@cdsec.com) Received: (from nobody@localhost) by citadel.cdsec.com (8.8.8/8.6.9) id NAA10215; Wed, 31 Mar 1999 13:54:10 +0200 (SAST) Received: by citadel via recvmail id 10212; Wed Mar 31 13:53:43 1999 Message-ID: <37020CE5.477F888D@cdsec.com> Date: Wed, 31 Mar 1999 13:54:13 +0200 From: Graham Wheeler X-Mailer: Mozilla 4.08 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) MIME-Version: 1.0 To: Ladavac Marino , hackers@freebsd.org Subject: Re: select() on UDP socket returns ECONNREFUSED References: <97A8CA5BF490D211A94F0000F6C2E55D097583@s-lmh-wi-900.corpnet.at> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ladavac Marino wrote: > > Subject: select() on UDP socket returns ECONNREFUSED > > > > Hi all > > > > Does anyone know what this means? The source code for select is buried > > in some non-obvious place so I haven't been able to check it directly. > [ML] I don't parse this. > > Do you mean, select returns -1 and sets errno to ECONNREFUSED? Oops (hides head in embarassment). I just checked the code (which wasn't mine) and saw that the error gets logged if the select returns something other than 1 and errno isn't EINTR. Which means that this is happening when the select times out and returns zero. Turns out the person who wrote the code erroneously assumed that select() would return errno==EINTR if it timed out. -- Dr Graham Wheeler E-mail: gram@cdsec.com Citadel Data Security Phone: +27(21)423-6065/6/7 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Internet/Intranet Network Specialists Data Security Products WWW: http://www.cdsec.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message