2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

more fully implement the 'standard' in6_addr, and use the macros correctly

in adb.c
This commit is contained in:
Michael Graff
1999-12-02 23:45:30 +00:00
parent 443ad8c09c
commit f6f4ceece4
2 changed files with 8 additions and 10 deletions

View File

@@ -428,12 +428,8 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
INSIST((rdtype == dns_rdatatype_a) || (rdtype == dns_rdatatype_aaaa));
if (rdtype == dns_rdatatype_a)
findoptions = DNS_ADBFIND_INET;
else {
else
findoptions = DNS_ADBFIND_INET6;
#if !defined(ISC_PLATFORM_HAVEIPV6)
INSIST(0);
#endif
}
addr_bucket = DNS_ADB_INVALIDBUCKET;
new_addresses_added = ISC_FALSE;
@@ -452,13 +448,11 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
isc_sockaddr_fromin6(&sockaddr, &in6a, 53);
}
#if defined(ISC_PLATFORM_HAVEIPV6) /* XXXMLG Should use isc_net_() function? */
if (IN6_IS_ADDR_V4MAPPED(&sockaddr.type.sin6.sin6_addr)
|| IN6_IS_ADDR_V4COMPAT(&sockaddr.type.sin6.sin6_addr)) {
DP(1, "Ignoring IPv6 mapped IPv4 address");
goto next;
}
#endif
INSIST(nh == NULL);
nh = new_adbnamehook(adb, NULL);
@@ -563,13 +557,11 @@ import_a6(dns_a6context_t *a6ctx)
isc_sockaddr_fromin6(&sockaddr, &a6ctx->in6addr, 53);
#if defined(ISC_PLATFORM_HAVEIPV6) /* XXXMLG Should use isc_net_() function? */
if (IN6_IS_ADDR_V4MAPPED(&sockaddr.type.sin6.sin6_addr)
|| IN6_IS_ADDR_V4COMPAT(&sockaddr.type.sin6.sin6_addr)) {
DP(1, "Ignoring IPv6 mapped IPv4 address");
goto fail;
}
#endif
foundentry = find_entry_and_lock(adb, &sockaddr, &addr_bucket);
if (foundentry == NULL) {