From owner-freebsd-arch@FreeBSD.ORG Sat Mar 29 08:50:51 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 173D137B401 for ; Sat, 29 Mar 2003 08:50:51 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8426143F85 for ; Sat, 29 Mar 2003 08:50:50 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 0E8EC5308; Sat, 29 Mar 2003 17:50:48 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: arch@freebsd.org From: des@ofug.org (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Sat, 29 Mar 2003 17:50:46 +0100 Message-ID: User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Allow underscores in DNS names X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2003 16:50:54 -0000 --=-=-= 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) --=-=-=--