From owner-freebsd-stable@FreeBSD.ORG Thu Mar 27 07:48:05 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCA9A37B401 for ; Thu, 27 Mar 2003 07:48:04 -0800 (PST) Received: from marius.org (cdm-66-156-207-bcst.cox-internet.com [66.76.156.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEC8E43FE9 for ; Thu, 27 Mar 2003 07:48:03 -0800 (PST) (envelope-from marius@marius.org) Received: from marius.org (localhost [127.0.0.1]) by marius.org (8.12.8/8.12.6) with ESMTP id h2RFm2D5086168; Thu, 27 Mar 2003 09:48:02 -0600 (CST) (envelope-from marius@marius.org) Received: (from marius@localhost) by marius.org (8.12.8/8.12.6/Submit) id h2RFm2Gq086167; Thu, 27 Mar 2003 09:48:02 -0600 (CST) Date: Thu, 27 Mar 2003 09:48:02 -0600 From: Marius Strom To: Terry Lambert Message-ID: <20030327154802.GL76682@marius.org> Mail-Followup-To: Terry Lambert , David J Duchscher , stable@FreeBSD.ORG References: <2F60240B-5FBD-11D7-8B57-0003930B3DA4@nostrum.com> <3E8226DC.9B005E01@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E8226DC.9B005E01@mindspring.com> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-32.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: stable@FreeBSD.ORG Subject: Re: Resolver Issues (non valid hostname characters) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2003 15:48:06 -0000 Ok, I've written such a program and have run it on a wide variety of systems. The program is at for your perusal. It's quick and dirty, and I didn't go for the extra credit of checking gethostbyaddr() calls. Here are my findings (And you may be surprised): Solaris 2.6: Violates RFC952 Solaris 8: Violates RFC952 Solaris 9: Violates RFC952 AIX 2: Violates RFC952 AIX 4.3: Violates RFC952 AIX 5.1: Violates RFC952 Digital Unix 4.0D: Violates RFC952 HP-UX B.11.00: Violates RFC952 OpenBSD 3.1: Violates RFC952 OpenBSD 3.2: Violates RFC952 Darwin 6.4: Violates RFC952 Linux 2.2.20: Violates RFC952 Linux 2.4.18: Violates RFC952 Mac OS X: Violates RFC952 Irix64 6.5: Violates RFC952 Windows 2000*: Violates RFC952 Windows XP*: Violates RFC952 Windows 98*: Violates RFC952 Windows NT 4.0*: Violates RFC952 Cisco IOS 12.1.8*: Violates RFC952 FreeBSD 3.3-STABLE: Complies w/RFC952 FreeBSD 4.7-RELEASE: Compiles w/RFC952 * These hosts wouldn't run my C program as-is. Missing WinSock compiler libraries or what not, so they were tested by `ping host_name_with_underscore` to check for success Looks as though FreeBSD is the ONLY operating system to comply with this. I wasn't able to get ahold of a NetBSD system to test. Looks like if you admin a non-FreeBSD system it doesn't comply with the RFC. On Wed, 26 Mar 2003, Terry Lambert wrote: > IP of "demo_host" in some domain under your own control, in > which you have created the record for "demo_host" with an IP > address of 1.1.1.1. > > Then you run the program, and it does a forward lookup on > the name, and prints the first message if it gets "1.1.1.1", > and prints the second if it gets and error. > > I would do this for you, but since I believe all hosts I own > comply with RFC-952, I am unable to create the DNS record for > testing. > > > For bonus points, use a free IP address in your addres block, > instead of 1.1.1.1, and, if the lookup is successful, do a > reverse lookup, too, and make sure both gethostbyname() and > gethostbyaddr() work the way you say they work. > > -- Terry > -- /-------------------------------------------------> Marius Strom | Always carry a short length of fibre-optic cable. Professional Geek | If you get lost, then you can drop it on the System/Network Admin | ground, wait 10 minutes, and ask the backhoe http://www.marius.org/ | operator how to get back to civilization. \-------------| Alan Frame |---------------------->