svn commit: r193023 - head/lib/libc/resolv

Xin LI delphij at FreeBSD.org
Fri May 29 07:34:55 UTC 2009


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


More information about the svn-src-all mailing list