Add an option to enforce strict RFC 1034 compliance.

PR:		kern/129477
This commit is contained in:
Xin LI 2009-05-29 07:34:54 +00:00
parent c2a41f4367
commit a28076c8f7

View File

@ -148,7 +148,11 @@ dn_skipname(const u_char *ptr, const u_char *eom) {
#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