mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
2343. [bug] (Seemingly) duplicate IPv6 entries could be
created in ADB. [RT #17837] (plan to merge to 9.[345])
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
2343. [bug] (Seemingly) duplicate IPv6 entries could be
|
||||
created in ADB. [RT #17837]
|
||||
|
||||
2342. [func] Use getifaddrs() if available under Linux. [RT #17224]
|
||||
|
||||
2341. [bug] libbind: add missing -I../include for off source
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.235 2008/02/07 23:46:54 tbox Exp $ */
|
||||
/* $Id: adb.c,v 1.236 2008/03/20 19:23:42 jinmei Exp $ */
|
||||
|
||||
/*! \file
|
||||
*
|
||||
@@ -530,6 +530,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
|
||||
isc_boolean_t new_addresses_added;
|
||||
dns_rdatatype_t rdtype;
|
||||
unsigned int findoptions;
|
||||
dns_adbnamehooklist_t *hookhead;
|
||||
|
||||
INSIST(DNS_ADBNAME_VALID(adbname));
|
||||
adb = adbname->adb;
|
||||
@@ -554,10 +555,12 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
|
||||
INSIST(rdata.length == 4);
|
||||
memcpy(&ina.s_addr, rdata.data, 4);
|
||||
isc_sockaddr_fromin(&sockaddr, &ina, 0);
|
||||
hookhead = &adbname->v4;
|
||||
} else {
|
||||
INSIST(rdata.length == 16);
|
||||
memcpy(in6a.s6_addr, rdata.data, 16);
|
||||
isc_sockaddr_fromin6(&sockaddr, &in6a, 0);
|
||||
hookhead = &adbname->v6;
|
||||
}
|
||||
|
||||
INSIST(nh == NULL);
|
||||
@@ -586,7 +589,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
|
||||
|
||||
link_entry(adb, addr_bucket, entry);
|
||||
} else {
|
||||
for (anh = ISC_LIST_HEAD(adbname->v4);
|
||||
for (anh = ISC_LIST_HEAD(*hookhead);
|
||||
anh != NULL;
|
||||
anh = ISC_LIST_NEXT(anh, plink))
|
||||
if (anh->entry == foundentry)
|
||||
@@ -599,12 +602,8 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
|
||||
}
|
||||
|
||||
new_addresses_added = ISC_TRUE;
|
||||
if (nh != NULL) {
|
||||
if (rdtype == dns_rdatatype_a)
|
||||
ISC_LIST_APPEND(adbname->v4, nh, plink);
|
||||
else
|
||||
ISC_LIST_APPEND(adbname->v6, nh, plink);
|
||||
}
|
||||
if (nh != NULL)
|
||||
ISC_LIST_APPEND(*hookhead, nh, plink);
|
||||
nh = NULL;
|
||||
result = dns_rdataset_next(rdataset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user