mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Specify the correct place where to canonicalize RR within RRset.
This commit is contained in:
committed by
Simon Kelley
parent
9940aba9f6
commit
382e38f494
11
src/dnssec.c
11
src/dnssec.c
@@ -169,9 +169,12 @@ static int validate_rrsig(struct dns_header *header, size_t pktlen,
|
|||||||
if (res == 1 && qtype == sigtype && qclass == sigclass)
|
if (res == 1 && qtype == sigtype && qclass == sigclass)
|
||||||
{
|
{
|
||||||
++rrsetidx;
|
++rrsetidx;
|
||||||
assert(rrsetidx < countof(rrset));
|
if (rrsetidx == countof(rrset))
|
||||||
/* TODO: here we should convert to lowercase domain names within
|
{
|
||||||
RDATA. We can do it in place. */
|
/* Internal buffer too small */
|
||||||
|
printf("internal buffer too small for this RRset\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
p += rdlen;
|
p += rdlen;
|
||||||
}
|
}
|
||||||
@@ -205,6 +208,8 @@ static int validate_rrsig(struct dns_header *header, size_t pktlen,
|
|||||||
p = (unsigned char*)(rrset[i]);
|
p = (unsigned char*)(rrset[i]);
|
||||||
p += 8;
|
p += 8;
|
||||||
GETSHORT(rdlen, p);
|
GETSHORT(rdlen, p);
|
||||||
|
/* TODO: instead of a direct add_data(), we must call a RRtype-specific
|
||||||
|
function, that extract and canonicalizes domain names within RDATA. */
|
||||||
alg->add_data(p-2, rdlen+2);
|
alg->add_data(p-2, rdlen+2);
|
||||||
}
|
}
|
||||||
alg->end_data();
|
alg->end_data();
|
||||||
|
|||||||
Reference in New Issue
Block a user