Handle domain names with '.' or /000 within labels.

Only in DNSSEC mode, where we might need to validate or store
such names. In none-DNSSEC mode, simply don't cache these, as before.
This commit is contained in:
Simon Kelley
2015-04-21 22:57:06 +01:00
parent 338b340be9
commit cbe379ad6b
5 changed files with 71 additions and 13 deletions

View File

@@ -226,7 +226,14 @@ unsigned char *do_rfc1035_name(unsigned char *p, char *sval)
{
unsigned char *cp = p++;
for (j = 0; *sval && (*sval != '.'); sval++, j++)
*p++ = *sval;
{
#ifdef HAVE_DNSSEC
if (option_bool(OPT_DNSSEC_VALID) && *sval == NAME_ESCAPE)
*p++ = *(++sval);
else
#endif
*p++ = *sval;
}
*cp = j;
if (*sval)
sval++;