Date: Mon, 6 Jun 2005 21:20:31 GMT From: Pav Lucistnik <pav@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/54189: [dns] resolver should resolve hostnames with underscores Message-ID: <200506062120.j56LKVRT052902@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/54189; it has been noted by GNATS. From: Pav Lucistnik <pav@FreeBSD.org> To: lennox@cs.columbia.edu, bug-followup@FreeBSD.org Cc: Subject: Re: kern/54189: [dns] resolver should resolve hostnames with underscores Date: Mon, 06 Jun 2005 23:18:18 +0200 Patch to allow underscores as "middlechars" in domain names. Works for me. --- /home/pav/res_comp.c Mon Jun 6 23:13:29 2005 +++ net/res_comp.c Mon Jun 6 23:08:14 2005 @@ -143,6 +143,7 @@ */ #define PERIOD 0x2e #define hyphenchar(c) ((c) == 0x2d) +#define underscorechar(c) ((c) == 0x5f) #define bslashchar(c) ((c) == 0x5c) #define periodchar(c) ((c) == PERIOD) #define asterchar(c) ((c) == 0x2a) @@ -151,7 +152,7 @@ #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) || underscorechar(c)) #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) int -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Thank God we're theoretical physicists so we don't have to get our hands dirty with particle accelerators and other heavy machinery.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506062120.j56LKVRT052902>