Add support for '_' occurring at the beginning or end of a name

component.

PR:		176093
Submitted by:	landonf__at__bikemonkey.org
MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2015-06-10 16:15:22 +00:00
parent c0027d73e2
commit 0df21fef2d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284229

View File

@ -147,12 +147,12 @@ dn_skipname(const u_char *ptr, const u_char *eom) {
|| ((c) >= 0x61 && (c) <= 0x7a))
#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))
#define borderchar(c) (alphachar(c) || digitchar(c))
#else
#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
#define borderchar(c) (alphachar(c) || digitchar(c) || underscorechar(c))
#endif
#define middlechar(c) (borderchar(c) || hyphenchar(c))
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
int