From 1f4482458144d68c6b8389ee38ef3cd2dd696f59 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Mon, 14 Feb 2000 21:11:52 +0000 Subject: [PATCH] use bitstrings first, then nibble mode --- bin/lwresd/process_gnba.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/lwresd/process_gnba.c b/bin/lwresd/process_gnba.c index 109c0dedd8..2e14dca497 100644 --- a/bin/lwresd/process_gnba.c +++ b/bin/lwresd/process_gnba.c @@ -68,12 +68,16 @@ byaddr_done(isc_task_t *task, isc_event_t *event) dns_byaddr_destroy(&client->byaddr); isc_event_free(&event); - if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) == 0) { + if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) { error_pkt_send(client, LWRES_R_FAILURE); return; } - client->options &= ~DNS_BYADDROPT_IPV6NIBBLE; + /* + * Fall back to nibble reverse if the default of bitstrings + * fails. + */ + client->options |= DNS_BYADDROPT_IPV6NIBBLE; start_byaddr(client); return; @@ -211,7 +215,7 @@ process_gnba(client_t *client, lwres_buffer_t *b) /* * Start the find. */ - client->options = DNS_BYADDROPT_IPV6NIBBLE; + client->options = 0; start_byaddr(client); return;