lwdgrbn.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2000, 2001, 2003-2007, 2009, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: lwdgrbn.c,v 1.22 2009/09/02 23:48:01 tbox Exp $ */
/*! \file */
#include <config.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <named/lwdclient.h>
#include <named/lwsearch.h>
static void start_lookup(ns_lwdclient_t *);
static isc_result_t
{
isc_region_t r;
result == ISC_R_SUCCESS;
{
dns_rdata_toregion(&rdata, &r);
(*pos)++;
}
if (result == ISC_R_NOMORE)
return (result);
}
static isc_result_t
{
if (result != ISC_R_SUCCESS)
goto out;
goto out;
goto out;
result == ISC_R_SUCCESS;
{
continue;
}
/* copy & reallocate */
size *= 2;
goto out;
goto out;
}
flags &= (~LWRDATA_VALIDATED);
if (result != ISC_R_SUCCESS)
goto out;
}
if (result == ISC_R_NOMORE)
if (result != ISC_R_SUCCESS)
goto out;
/*
* If necessary, shrink and copy the arrays.
*/
goto out;
goto out;
} else {
}
return (ISC_R_SUCCESS);
out:
return (result);
}
static void
isc_region_t r;
isc_buffer_t b;
int i;
if (result != ISC_R_SUCCESS) {
switch (result) {
case DNS_R_NXDOMAIN:
case DNS_R_NCACHENXDOMAIN:
if (result != ISC_R_SUCCESS)
else {
return;
}
break;
case DNS_R_NXRRSET:
case DNS_R_NCACHENXRRSET:
break;
default:
}
return;
}
b = client->recv_buffer;
if (result != ISC_R_SUCCESS)
goto out;
/* The normal case */
sizeof(unsigned char *));
goto out;
sizeof(lwres_uint16_t));
goto out;
i = 0;
if (result != ISC_R_SUCCESS)
goto out;
} else {
/* The SIG query case */
if (result != ISC_R_SUCCESS)
goto out;
}
if (sigrdataset != NULL) {
sizeof(unsigned char *));
goto out;
sizeof(lwres_uint16_t));
goto out;
i = 0;
if (result != ISC_R_SUCCESS)
goto out;
}
/*
* Render the packet.
*/
if (lwresult != LWRES_R_SUCCESS)
goto out;
if (result != ISC_R_SUCCESS)
goto out2;
return;
out:
out2:
}
static void
/*
* This will return failure if relative name + suffix is too long.
* In this case, just go on to the next entry in the search path.
*/
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
return;
}
}
static void
}
void
if (result != LWRES_R_SUCCESS)
goto out;
goto out;
goto out;
goto out;
if (result != ISC_R_SUCCESS)
goto out;
/*
* We no longer need to keep this around.
*/
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
/*
* Start the find.
*/
return;
/*
* We're screwed. Return an error packet to our caller.
*/
out:
}