mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
746. [bug] The sdb didn't clone rdatasets properly, causing
a crash when the server followed delegations. [RT #905]
This commit is contained in:
parent
23ffed7653
commit
a012d6dbfb
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
746. [bug] The sdb didn't clone rdatasets properly, causing
|
||||||
|
a crash when the server followed delegations. [RT #905]
|
||||||
|
|
||||||
745. [func] Report the owner name of records that fail
|
745. [func] Report the owner name of records that fail
|
||||||
semantic checks while loading.
|
semantic checks while loading.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: sdb.c,v 1.27 2001/02/14 00:29:16 gson Exp $ */
|
/* $Id: sdb.c,v 1.28 2001/02/20 23:20:44 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -1252,12 +1252,24 @@ disassociate(dns_rdataset_t *rdataset) {
|
|||||||
isc__rdatalist_disassociate(rdataset);
|
isc__rdatalist_disassociate(rdataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||||
|
dns_dbnode_t *node = source->private5;
|
||||||
|
dns_sdbnode_t *sdbnode = (dns_sdbnode_t *) node;
|
||||||
|
dns_db_t *db = (dns_db_t *) sdbnode->sdb;
|
||||||
|
dns_dbnode_t *tempdb = NULL;
|
||||||
|
|
||||||
|
isc__rdatalist_clone(source, target);
|
||||||
|
attachnode(db, node, &tempdb);
|
||||||
|
source->private5 = tempdb;
|
||||||
|
}
|
||||||
|
|
||||||
static dns_rdatasetmethods_t methods = {
|
static dns_rdatasetmethods_t methods = {
|
||||||
disassociate,
|
disassociate,
|
||||||
isc__rdatalist_first,
|
isc__rdatalist_first,
|
||||||
isc__rdatalist_next,
|
isc__rdatalist_next,
|
||||||
isc__rdatalist_current,
|
isc__rdatalist_current,
|
||||||
isc__rdatalist_clone,
|
rdataset_clone,
|
||||||
isc__rdatalist_count
|
isc__rdatalist_count
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1266,6 +1278,13 @@ list_tordataset(dns_rdatalist_t *rdatalist,
|
|||||||
dns_db_t *db, dns_dbnode_t *node,
|
dns_db_t *db, dns_dbnode_t *node,
|
||||||
dns_rdataset_t *rdataset)
|
dns_rdataset_t *rdataset)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* The sdb rdataset is an rdatalist with some additions.
|
||||||
|
* - private1 & private2 are used by the rdatalist.
|
||||||
|
* - private3 & private 4 are unused.
|
||||||
|
* - private5 is the node.
|
||||||
|
*/
|
||||||
|
|
||||||
/* This should never fail. */
|
/* This should never fail. */
|
||||||
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset) ==
|
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset) ==
|
||||||
ISC_R_SUCCESS);
|
ISC_R_SUCCESS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user