From owner-freebsd-net Tue Mar 27 8:24: 9 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id BCA5E37B719; Tue, 27 Mar 2001 08:24:06 -0800 (PST) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f2RGJMC38803; Tue, 27 Mar 2001 10:19:22 -0600 (CST) (envelope-from jlemon) Date: Tue, 27 Mar 2001 10:19:22 -0600 From: Jonathan Lemon To: Jesper Skriver Cc: Jeroen Ruigrok/Asmodai , Bill Fenner , net@freebsd.org, jlemon@freebsd.org Subject: Re: 4.3 issue: new ICMP handling broke date(1) Message-ID: <20010327101922.N93687@prism.flugsvamp.com> References: <200103261557.JAA08568@windsor.research.att.com> <20010327124531.O68667@daemon.ninth-circle.org> <20010327131246.A71551@skriver.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010327131246.A71551@skriver.dk> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Mar 27, 2001 at 01:12:47PM +0200, Jesper Skriver wrote: > On Tue, Mar 27, 2001 at 12:45:31PM +0200, Jeroen Ruigrok/Asmodai wrote: > > [making sure Jesper and Jonathan see this] > > > > -On [20010326 18:00], Bill Fenner (fenner@research.att.com) wrote: > > >Now that an ICMP port unreachable returns ENETRESET and not ECONNREFUSED, > > >setting the date on the command line results in a bogusly-reported error. > > >Before you fix the bug in date/netdate.c, it tends to report EADDRINUSE; > > >afterwards it tends to report ENETRESET. > > > > > >Why did the handling of "udp port unreachable" have to change? ECONNREFUSED > > >was a perfectly fine return value for that. I'm reasonably sure that > > >there are other programs out there that think that ECONNREFUSED is what > > >you get when you get an ICMP port unreachable back after a UDP send, > > >so I doubt that the answer is to simply fix date(1). > > > > FWIW I think the correct thing would be to return ECONNREFUSED. > > > > Looking at intro(2) it would seem that ECONNREFUSED fits the shoe since > > the connection is actively refused. I forget why I picked ENETRESET; probably because it was the first thing that leaped out at me when I quickly skimmed over looking for an appropriate error code; but I didn't consider the UDP case. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message