summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2015-06-10 16:15:22 +0000
committerume <ume@FreeBSD.org>2015-06-10 16:15:22 +0000
commitef4c2ddbf3f8756d8c095e9040ea15cb6e22d513 (patch)
tree45ff0b6d7ab4d55420087283a0898d234df26841
parent4559857c8ee5605e66907b97f02fd450cd9249db (diff)
downloadFreeBSD-src-ef4c2ddbf3f8756d8c095e9040ea15cb6e22d513.zip
FreeBSD-src-ef4c2ddbf3f8756d8c095e9040ea15cb6e22d513.tar.gz
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
-rw-r--r--lib/libc/resolv/res_comp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/resolv/res_comp.c b/lib/libc/resolv/res_comp.c
index 539d974..279ea23 100644
--- a/lib/libc/resolv/res_comp.c
+++ b/lib/libc/resolv/res_comp.c
@@ -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
OpenPOWER on IntegriCloud