mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-29 12:50:47 +00:00
Blockdata fixes and tuning.
This commit is contained in:
1 parent
072e81b3c5
commit
82e3f45a9f
4 files changed
+51
-13
No files matched your search
+18
-5
@@ -170,7 +170,22 @@ static void cache_hash(struct crec *crecp)
|
||||
crecp->hash_next = *up;
|
||||
*up = crecp;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_DNSSEC
|
||||
static void cache_blockdata_free(struct crec *crecp)
|
||||
{
|
||||
if (crecp->flags & F_DNSKEY)
|
||||
{
|
||||
if (crecp->flags & F_DS)
|
||||
blockdata_free(crecp->addr.sig.keydata);
|
||||
else
|
||||
blockdata_free(crecp->addr.key.keydata);
|
||||
}
|
||||
else if (crecp->flags & F_DS)
|
||||
blockdata_free(crecp->addr.ds.keydata);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void cache_free(struct crec *crecp)
|
||||
{
|
||||
crecp->flags &= ~F_FORWARD;
|
||||
@@ -197,8 +212,7 @@ static void cache_free(struct crec *crecp)
|
||||
}
|
||||
|
||||
#ifdef HAVE_DNSSEC
|
||||
if (crecp->flags & (F_DNSKEY | F_DS))
|
||||
blockdata_free(crecp->addr.key.keydata);
|
||||
cache_blockdata_free(crecp);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -957,8 +971,7 @@ void cache_reload(void)
|
||||
for (cache = hash_table[i], up = &hash_table[i]; cache; cache = tmp)
|
||||
{
|
||||
#ifdef HAVE_DNSSEC
|
||||
if (cache->flags & (F_DNSKEY | F_DS))
|
||||
blockdata_free(cache->addr.key.keydata);
|
||||
cache_blockdata_free(cache);
|
||||
#endif
|
||||
tmp = cache->hash_next;
|
||||
if (cache->flags & (F_HOSTS | F_CONFIG))
|
||||
|
||||
Reference in new issue
Block a user