Add an option to enforce strict RFC 1034 compliance.
PR: kern/129477
This commit is contained in:
parent
c2a41f4367
commit
a28076c8f7
@ -148,7 +148,11 @@ dn_skipname(const u_char *ptr, const u_char *eom) {
|
|||||||
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
|
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
|
||||||
|
|
||||||
#define borderchar(c) (alphachar(c) || digitchar(c))
|
#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))
|
#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
|
||||||
|
#endif
|
||||||
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
|
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user