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.
This commit is contained in:
parent
ad884f939e
commit
0accfaf36f
18
src/res.c
18
src/res.c
|
@ -679,22 +679,8 @@ static int proc_answer(struct reslist *request, HEADER * header, char *buf, char
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
break;
|
break;
|
||||||
case T_CNAME: /* first check we already havent started looking
|
case T_CNAME:
|
||||||
into a cname */
|
/* real answer will follow */
|
||||||
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;
|
|
||||||
current += rd_length;
|
current += rd_length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue