Date: Sat, 29 Mar 2003 17:50:46 +0100 From: des@ofug.org (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) To: arch@freebsd.org Subject: Allow underscores in DNS names Message-ID: <xzpu1dm2k2h.fsf@flood.ping.uio.no>
next in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable The attached patch, inspired by a discussion on -STABLE, modifies our resolver library to allow underscores in host names, by classifying the underscore as a hyphen character. Even though RFC952 forbids them, underscores are becoming increasingly common in DNS, and they are sometimes used for mechanisms (such as Microsoft's automatic proxy configuration scheme) which we might want to support in FreeBSD. DES --=20 Dag-Erling Sm=F8rgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=hnok.diff Index: lib/libc/net/res_comp.c =================================================================== RCS file: /home/ncvs/src/lib/libc/net/res_comp.c,v retrieving revision 1.17 diff -u -r1.17 res_comp.c --- lib/libc/net/res_comp.c 22 Mar 2002 21:52:29 -0000 1.17 +++ lib/libc/net/res_comp.c 29 Mar 2003 16:42:57 -0000 @@ -142,7 +142,7 @@ * is not careful about this, but for some reason, we're doing it right here. */ #define PERIOD 0x2e -#define hyphenchar(c) ((c) == 0x2d) +#define hyphenchar(c) ((c) == 0x2d || (c) == 0x5f) #define bslashchar(c) ((c) == 0x5c) #define periodchar(c) ((c) == PERIOD) #define asterchar(c) ((c) == 0x2a) --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpu1dm2k2h.fsf>