lib/dns/private.c
/*
 * Work out if 'param' should be ignored or not (i.e. it is in the process
 * of being removed).
 *
 * Note: we 'belt-and-braces' here by also checking for a CREATE private
 * record and keep the param record in this case.
 */
Work out if 'param' should be ignored or not .

we 'belt-and-braces' here by also checking for a CREATE private
record and keep the param record in this case.
Work out if ' param ' should be ignored or not . we ' belt - and - braces ' here by also checking for a CREATE private record and keep the param record in this case .
static isc_boolean_t
ignore(dns_rdata_t *param, dns_rdataset_t *privateset) {
	isc_result_t result;
	for (result = dns_rdataset_first(privateset);
	     result == ISC_R_SUCCESS;
	     result = dns_rdataset_next(privateset)) {
		unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE];
		dns_rdata_t private = DNS_RDATA_INIT;
		dns_rdata_t rdata = DNS_RDATA_INIT;
		dns_rdataset_current(privateset, &private);
		if (!dns_nsec3param_fromprivate(&private, &rdata,
						buf, sizeof(buf)))
			continue;
		if (CREATE(rdata.data[1]))
			return (ISC_FALSE);
		if (rdata.data[0] != param->data[0] ||
		    rdata.data[2] != param->data[2] ||
		    rdata.data[3] != param->data[3] ||
		    rdata.data[4] != param->data[4] ||
		    memcmp(&rdata.data[5], &param->data[5], param->data[4]))
			continue;
		if (NONSEC(rdata.data[1]))
			return (ISC_FALSE);
		return (ISC_TRUE);
	}
	return (ISC_FALSE);
}
static isc_boolean_t ignore ( dns_rdata_t * param , dns_rdataset_t * privateset ) { isc_result_t result ; for ( result = dns_rdataset_first ( privateset ) ; result == ISC_R_SUCCESS ; result = dns_rdataset_next ( privateset ) ) { unsigned char buf [ DNS_NSEC3PARAM_BUFFERSIZE ] ; dns_rdata_t private = DNS_RDATA_INIT ; dns_rdata_t rdata = DNS_RDATA_INIT ; dns_rdataset_current ( privateset , & private ) ; if ( ! dns_nsec3param_fromprivate ( & private , & rdata , buf , sizeof ( buf ) ) ) continue ; if ( CREATE ( rdata . data [ 1 ] ) ) return ( ISC_FALSE ) ; if ( rdata . data [ 0 ] != param -> data [ 0 ] || rdata . data [ 2 ] != param -> data [ 2 ] || rdata . data [ 3 ] != param -> data [ 3 ] || rdata . data [ 4 ] != param -> data [ 4 ] || memcmp ( & rdata . data [ 5 ] , & param -> data [ 5 ] , param -> data [ 4 ] ) ) continue ; if ( NONSEC ( rdata . data [ 1 ] ) ) return ( ISC_FALSE ) ; return ( ISC_TRUE ) ; } return ( ISC_FALSE ) ; }
Work out if 'param' should be ignored or not (i.e.
Work out if ' param ' should be ignored or not ( i . e .
/*
		 * We are going to create a new NSEC3 chain so it
		 * doesn't matter if we are removing this one.
		 */ /*
		 * The removal of this NSEC3 chain does NOT cause a
		 * NSEC chain to be created so we don't need to tell
		 * the caller that it will be removed.
		 */