Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2008 13:21:38 +0900
From:      Hajimu UMEMOTO <ume@freebsd.org>
To:        d@delphij.net
Cc:        freebsd-net@freebsd.org
Subject:   Re: Strange resolver behavior
Message-ID:  <ygeve4tlc4t.wl%ume@mahoroba.org>
In-Reply-To: <47B2488D.70707@delphij.net>
References:  <47B2488D.70707@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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


Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeve4tlc4t.wl%ume>