Commit fd447061 authored by Mark Andrews's avatar Mark Andrews

1547. [bug] Named wasted memory recording duplicate lame zone

                        entries. [RT #9341]
parent d6f0e450
1547. [bug] Named wasted memory recording duplicate lame zone
entries. [RT #9341]
1546. [bug] We were rejecting valid secure CNAME to negative
answers.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.211 2003/10/25 00:31:08 jinmei Exp $ */
/* $Id: adb.c,v 1.212 2004/01/05 06:44:30 marka Exp $ */
/*
* Implementation notes
......@@ -3313,20 +3313,32 @@ dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
{
dns_adbzoneinfo_t *zi;
int bucket;
isc_result_t result = ISC_R_SUCCESS;
REQUIRE(DNS_ADB_VALID(adb));
REQUIRE(DNS_ADBADDRINFO_VALID(addr));
REQUIRE(zone != NULL);
bucket = addr->entry->lock_bucket;
LOCK(&adb->entrylocks[bucket]);
zi = ISC_LIST_HEAD(addr->entry->zoneinfo);
while (zi != NULL && dns_name_equal(zone, &zi->zone))
zi = ISC_LIST_NEXT(zi, plink);
if (zi != NULL) {
if (expire_time > zi->lame_timer)
zi->lame_timer = expire_time;
goto unlock;
}
zi = new_adbzoneinfo(adb, zone);
if (zi == NULL)
return (ISC_R_NOMEMORY);
if (zi == NULL) {
result = ISC_R_NOMEMORY;
goto unlock;
}
zi->lame_timer = expire_time;
bucket = addr->entry->lock_bucket;
LOCK(&adb->entrylocks[bucket]);
ISC_LIST_PREPEND(addr->entry->zoneinfo, zi, plink);
unlock:
UNLOCK(&adb->entrylocks[bucket]);
return (ISC_R_SUCCESS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment