From c889c12f3a3ae1958b9cd60c33ffad66e55a4af0 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 15 Jun 2008 00:57:15 +0200 Subject: [PATCH] Allow CNAMEs everywhere, named will have recursed into them for us. This makes PTRs containing names that are a CNAME for an A (instead of an A) work. While this is probably bad practice, some people do it and most other ircds seem to accept it. --- src/res.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/res.c b/src/res.c index 08b2c251..f3b6e806 100644 --- a/src/res.c +++ b/src/res.c @@ -679,22 +679,8 @@ static int proc_answer(struct reslist *request, HEADER * header, char *buf, char return (1); break; - case T_CNAME: /* first check we already havent started looking - into a cname */ - if (request->type != T_PTR) - return (0); - - if (request->state == REQ_CNAME) - { - n = irc_dn_expand((unsigned char *)buf, (unsigned char *)eob, - current, hostbuf, sizeof(hostbuf)); - - if (n < 0) - return (0); - return (1); - } - - request->state = REQ_CNAME; + case T_CNAME: + /* real answer will follow */ current += rd_length; break;