mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Replace the separate pointer+length field pairs in dns_rdata_nsec3_t (salt/salt_length, next/next_length, typebits/len) and dns_rdata_nsec3param_t (salt/salt_length) with isc_region_t. This makes the structs self-describing and eliminates a class of length-mismatch bugs. The dns_zone_setnsec3param() signature is updated to take isc_region_t *salt instead of separate saltlen and salt arguments. Function signatures for dns_nsec3_addnsec3, dns_db_getnsec3parameters, and related internal functions still use separate pointer+length pairs and should be updated in a follow-up.
28 lines
727 B
C
28 lines
727 B
C
/*
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
*
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*
|
|
* 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 https://mozilla.org/MPL/2.0/.
|
|
*
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
* information regarding copyright ownership.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/*!
|
|
* \brief Per RFC 5155 */
|
|
|
|
#include <isc/iterated_hash.h>
|
|
|
|
typedef struct dns_rdata_nsec3param {
|
|
dns_rdatacommon_t common;
|
|
isc_mem_t *mctx;
|
|
dns_hash_t hash;
|
|
unsigned char flags; /* DNS_NSEC3FLAG_* */
|
|
dns_iterations_t iterations;
|
|
isc_region_t salt;
|
|
} dns_rdata_nsec3param_t;
|