From owner-freebsd-net@FreeBSD.ORG Wed Feb 13 05:51:16 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A440516A41A; Wed, 13 Feb 2008 05:51:16 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3454813C45B; Wed, 13 Feb 2008 05:51:16 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (unknown [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTP id 6FC4928478; Wed, 13 Feb 2008 13:51:13 +0800 (CST) Received: from localhost (unknown [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id 1114CEB3A31; Wed, 13 Feb 2008 13:51:13 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id 0ELeLEXAs+Uy; Wed, 13 Feb 2008 13:51:07 +0800 (CST) Received: from charlie.delphij.net (c-67-161-39-180.hsd1.ca.comcast.net [67.161.39.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 9240EEB396A; Wed, 13 Feb 2008 13:51:05 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=ru4rVC3/xQHwMVxFE6rIjcSGM6EHtSdFhwm/bcGVhjE82smI3+5Y7gOkjkj3sRO9N ZyFuiAQiyZq4/m9pMfflw== Message-ID: <47B28546.9070504@delphij.net> Date: Tue, 12 Feb 2008 21:51:02 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20080122) MIME-Version: 1.0 To: Hajimu UMEMOTO References: <47B2488D.70707@delphij.net> In-Reply-To: X-Enigmail-Version: 0.95.5 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, d@delphij.net Subject: Re: Strange resolver behavior X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2008 05:51:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hajimu UMEMOTO wrote: > Hi, > >>>>>> On Tue, 12 Feb 2008 17:31:57 -0800 >>>>>> Xin LI said: > > delphij> [delphij@charlie] ~> host ps_other.a.shifen.com > delphij> ps_other.a.shifen.com has address 202.108.22.46 > delphij> Host ps_other.a.shifen.com not found: 3(NXDOMAIN) > > `_' is not allowed in hostname. Our resolver (BIND's resolver) > rejects it. > If you don't want this behavior, you can try the following patch, but > I don't recommend: > > Index: lib/libc/resolv/res_comp.c > diff -u -p lib/libc/resolv/res_comp.c.orig lib/libc/resolv/res_comp.c > --- lib/libc/resolv/res_comp.c.orig 2006-07-17 19:09:58.000000000 +0900 > +++ lib/libc/resolv/res_comp.c 2008-02-13 13:14:35.000000000 +0900 > @@ -151,7 +151,7 @@ dn_skipname(const u_char *ptr, const u_c > #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) > > #define borderchar(c) (alphachar(c) || digitchar(c)) > -#define middlechar(c) (borderchar(c) || hyphenchar(c)) > +#define middlechar(c) (borderchar(c) || hyphenchar(c) || ((c) == 0x5f)) > #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) > > int I see. The problem for this is that others (Windows, CentOS) does not enforce this. Except the RFC violation, is there any other risk having this compatibility? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHsoVGi+vbBBjt66ARAjGzAKCSe6kzS0QAFy7Ki8EEhfHtxyKCFQCeKmEa fkYC0lsNy9ejs3uvQbOhGgQ= =xSKL -----END PGP SIGNATURE-----