diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-11-18 14:14:09 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-11-18 14:14:09 +0000 |
commit | a3684c7a7fae3c0a0ad3d9641d29affc2b8aed03 (patch) | |
tree | bd1bf1ed050890b02d624a1468c39c2822f5ce45 /usr.sbin/bind/bin/named/lwdgnba.c | |
parent | 2177e8980dbcbd0b8006b290bb9de8e8565df3ba (diff) |
update to BIND v9.2.3. ok todd@
Diffstat (limited to 'usr.sbin/bind/bin/named/lwdgnba.c')
-rw-r--r-- | usr.sbin/bind/bin/named/lwdgnba.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/usr.sbin/bind/bin/named/lwdgnba.c b/usr.sbin/bind/bin/named/lwdgnba.c index bf9fbda5c8b..7b264a298ea 100644 --- a/usr.sbin/bind/bin/named/lwdgnba.c +++ b/usr.sbin/bind/bin/named/lwdgnba.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001 Internet Software Consortium. + * Copyright (C) 2000, 2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: lwdgnba.c,v 1.13 2001/08/08 22:54:19 gson Exp $ */ +/* $ISC: lwdgnba.c,v 1.13.2.2 2003/10/09 07:32:32 marka Exp $ */ #include <config.h> @@ -66,7 +66,8 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { isc_event_free(&event); bevent = NULL; - if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) { + if (client->na.family != AF_INET6 || + (client->options & DNS_BYADDROPT_IPV6NIBBLE) == 0) { if (result == DNS_R_NCACHENXDOMAIN || result == DNS_R_NCACHENXRRSET || result == DNS_R_NXDOMAIN || @@ -79,10 +80,12 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { } /* - * Fall back to nibble reverse if the default of bitstrings - * fails. + * Fall back to IP6.INT nibble then IP6.ARPA bitstring. */ - client->options |= DNS_BYADDROPT_IPV6NIBBLE; + if ((client->options & DNS_BYADDROPT_IPV6INT) == 0) + client->options |= DNS_BYADDROPT_IPV6INT; + else + client->options &= ~DNS_BYADDROPT_IPV6NIBBLE; start_byaddr(client); return; @@ -220,7 +223,10 @@ ns_lwdclient_processgnba(ns_lwdclient_t *client, lwres_buffer_t *b) { if (req->addr.address == NULL) goto out; - client->options = 0; + /* + * Start with IP6.ARPA NIBBLE lookups. + */ + client->options = DNS_BYADDROPT_IPV6NIBBLE; if (req->addr.family == LWRES_ADDRTYPE_V4) { client->na.family = AF_INET; if (req->addr.length != 4) @@ -249,7 +255,6 @@ ns_lwdclient_processgnba(ns_lwdclient_t *client, lwres_buffer_t *b) { * going to build up. */ init_gnba(client); - client->options = 0; /* * Start the find. |