summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <>2008-04-16 22:35:23 +0000
committerderaadt <>2008-04-16 22:35:23 +0000
commit165301a0f9e149652d5cea4bb7ae95744aaa3bf2 (patch)
treed938a2766f764a8289c4bde566292cc38e82ec23
parent5e750bd35f84420b17ed5842c8d69e716d485360 (diff)
downloadopenbsd-165301a0f9e149652d5cea4bb7ae95744aaa3bf2.tar.gz
openbsd-165301a0f9e149652d5cea4bb7ae95744aaa3bf2.tar.bz2
openbsd-165301a0f9e149652d5cea4bb7ae95744aaa3bf2.zip
permit _ in the middle of a DNS name component
-rw-r--r--src/lib/libc/net/res_comp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c
index 9bdc26dd24..69a6ce0abb 100644
--- a/src/lib/libc/net/res_comp.c
+++ b/src/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_comp.c,v 1.13 2005/08/06 20:30:03 espie Exp $ */ 1/* $OpenBSD: res_comp.c,v 1.14 2008/04/16 22:35:23 deraadt Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1993 4 * ++Copyright++ 1985, 1993
@@ -332,6 +332,7 @@ dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, u_char **lastdnptr)
332#define PERIOD 0x2e 332#define PERIOD 0x2e
333#define hyphenchar(c) ((c) == 0x2d) 333#define hyphenchar(c) ((c) == 0x2d)
334#define bslashchar(c) ((c) == 0x5c) 334#define bslashchar(c) ((c) == 0x5c)
335#define underscorechar(c) ((c) == 0x5f)
335#define periodchar(c) ((c) == PERIOD) 336#define periodchar(c) ((c) == PERIOD)
336#define asterchar(c) ((c) == 0x2a) 337#define asterchar(c) ((c) == 0x2a)
337#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \ 338#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
@@ -339,7 +340,7 @@ dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, u_char **lastdnptr)
339#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) 340#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
340 341
341#define borderchar(c) (alphachar(c) || digitchar(c)) 342#define borderchar(c) (alphachar(c) || digitchar(c))
342#define middlechar(c) (borderchar(c) || hyphenchar(c)) 343#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
343#define domainchar(c) ((c) > 0x20 && (c) < 0x7f) 344#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
344 345
345int 346int