From owner-svn-src-head@FreeBSD.ORG Fri May 29 07:34:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485AF1065673; Fri, 29 May 2009 07:34:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 365418FC1E; Fri, 29 May 2009 07:34:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4T7YtW7063622; Fri, 29 May 2009 07:34:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4T7Yt2S063621; Fri, 29 May 2009 07:34:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200905290734.n4T7Yt2S063621@svn.freebsd.org> From: Xin LI Date: Fri, 29 May 2009 07:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193023 - head/lib/libc/resolv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 07:34:55 -0000 Author: delphij Date: Fri May 29 07:34:54 2009 New Revision: 193023 URL: http://svn.freebsd.org/changeset/base/193023 Log: Add an option to enforce strict RFC 1034 compliance. PR: kern/129477 Modified: head/lib/libc/resolv/res_comp.c Modified: head/lib/libc/resolv/res_comp.c ============================================================================== --- head/lib/libc/resolv/res_comp.c Fri May 29 07:26:44 2009 (r193022) +++ head/lib/libc/resolv/res_comp.c Fri May 29 07:34:54 2009 (r193023) @@ -148,7 +148,11 @@ dn_skipname(const u_char *ptr, const u_c #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) #define borderchar(c) (alphachar(c) || digitchar(c)) +#ifdef RES_ENFORCE_RFC1034 +#define middlechar(c) (borderchar(c) || hyphenchar(c)) +#else #define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) +#endif #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) int