Teach cache to store DS and DNSKEY records

This commit is contained in:
Simon Kelley committed 2012-04-27 10:30:49 +01:00
1 parent 19d69be220
commit 7b4ad2eb34
4 files changed
+105 -16

No files matched your search

+7 -3
View File
@@ -936,10 +936,14 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
if (!cname_count--)
return 0; /* looped CNAMES */
newc = cache_insert(name, NULL, now, attl, F_CNAME | F_FORWARD);
if (newc && cpp)
if (newc)
{
cpp->addr.cname.cache = newc;
cpp->addr.cname.uid = newc->uid;
newc->addr.cname.cache = NULL;
if (cpp)
{
cpp->addr.cname.cache = newc;
cpp->addr.cname.uid = newc->uid;
}
}
cpp = newc;