nsec.c revision 70e5a7403f0e0a3bd292b8287c5fed5772c15270
/*
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsec.c,v 1.9 2007/06/19 23:47:16 tbox Exp $ */
/*! \file */
#include <config.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#define RETERR(x) do { \
result = (x); \
if (result != ISC_R_SUCCESS) \
goto failure; \
} while (0)
static void
if (bit != 0)
else
}
static unsigned int
}
{
isc_region_t r;
unsigned int i, window;
int octet;
unsigned int max_type;
dns_name_toregion(target, &r);
/*
* Use the end of the space for a raw bitmap leaving enough
* space for the window identifiers and length octets.
*/
if (result != ISC_R_SUCCESS)
return (result);
result == ISC_R_SUCCESS;
{
}
}
/*
* At zone cuts, deny the existence of glue in the parent zone.
*/
for (i = 0; i <= max_type; i++) {
}
}
if (result != ISC_R_NOMORE)
return (result);
break;
break;
if (octet < 0)
continue;
/*
* Note: potential overlapping move.
*/
}
&r);
return (ISC_R_SUCCESS);
}
{
unsigned char data[DNS_NSEC_BUFFERSIZE];
0, NULL);
if (result == DNS_R_UNCHANGED)
return (result);
}
/* This should never fail */
i += 2;
break;
continue;
type % 256));
break;
}
return (present);
}