Date: Tue, 12 Feb 2008 21:51:02 -0800 From: Xin LI <delphij@delphij.net> To: Hajimu UMEMOTO <ume@freebsd.org> Cc: freebsd-net@freebsd.org, d@delphij.net Subject: Re: Strange resolver behavior Message-ID: <47B28546.9070504@delphij.net> In-Reply-To: <ygeve4tlc4t.wl%ume@mahoroba.org> References: <47B2488D.70707@delphij.net> <ygeve4tlc4t.wl%ume@mahoroba.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hajimu UMEMOTO wrote: > Hi, > >>>>>> On Tue, 12 Feb 2008 17:31:57 -0800 >>>>>> Xin LI <delphij@delphij.net> 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 <delphij@delphij.net> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47B28546.9070504>