2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

Remove unused support for fromwire(DNS_NAME_DOWNCASE)

Most of this change is fixing dns_rdata_fromwire() so
it does not propagate the unused options variable.
This commit is contained in:
Tony Finch 2022-11-09 17:10:59 +00:00 committed by Tony Finch
parent ecd428240b
commit 50ab648f8a
89 changed files with 72 additions and 115 deletions

View File

@ -1,3 +1,8 @@
6087. [cleanup] Remove support for the `DNS_NAME_DOWNCASE` option to
the various dns_*_fromwire() functions. It has long
been unused and is unsupported since change 6022.
[GL !7467]
6086. [cleanup] Remove some remnants of bitstring labels. [GL !7196]
6085. [func] Add isc_time_monotonic() to simplify time measurements.

View File

@ -297,7 +297,7 @@ print_yaml(dns_dtdata_t *dt) {
isc_buffer_init(&b, m->query_zone.data, m->query_zone.len);
isc_buffer_add(&b, m->query_zone.len);
result = dns_name_fromwire(name, &b, DNS_DECOMPRESS_NEVER, 0,
result = dns_name_fromwire(name, &b, DNS_DECOMPRESS_NEVER,
NULL);
if (result == ISC_R_SUCCESS) {
printf(" query_zone: ");

View File

@ -72,7 +72,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
isc_buffer_add(&new_buf, size);
isc_buffer_setactive(&new_buf, size);
isc_buffer_forward(&new_buf, size / 2);
new_result = dns_name_fromwire(new_name, &new_buf, dctx, 0, NULL);
new_result = dns_name_fromwire(new_name, &new_buf, dctx, NULL);
isc_buffer_constinit(&old_buf, data, size);
isc_buffer_add(&old_buf, size);

View File

@ -145,7 +145,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
* reading a packet)
*/
CHECK(dns_rdata_fromwire(&rdata1, rdclass, rdtype, &source,
DNS_DECOMPRESS_NEVER, 0, &target));
DNS_DECOMPRESS_NEVER, &target));
assert(rdata1.length == size);
/*

View File

@ -1134,7 +1134,7 @@ dns_client_addtrustedkey(dns_client_t *client, dns_rdataclass_t rdclass,
dns_rdata_init(&rdata);
isc_buffer_setactive(databuf, isc_buffer_usedlength(databuf));
CHECK(dns_rdata_fromwire(&rdata, rdclass, rdtype, databuf,
DNS_DECOMPRESS_NEVER, 0, &b));
DNS_DECOMPRESS_NEVER, &b));
if (rdtype == dns_rdatatype_ds) {
CHECK(dns_rdata_tostruct(&rdata, &ds, NULL));

View File

@ -51,7 +51,7 @@
#define TOTEXTTYPE "rdata->type"
#define TOTEXTDEF "use_default = true"
#define FROMWIREARGS "rdclass, type, source, dctx, options, target"
#define FROMWIREARGS "rdclass, type, source, dctx, target"
#define FROMWIRECLASS "rdclass"
#define FROMWIRETYPE "type"
#define FROMWIREDEF "use_default = true"

View File

@ -681,7 +681,7 @@ dns_name_toregion(const dns_name_t *name, isc_region_t *r);
isc_result_t
dns_name_fromwire(dns_name_t *name, isc_buffer_t *source, dns_decompress_t dctx,
unsigned int options, isc_buffer_t *target);
isc_buffer_t *target);
/*%<
* Copy the possibly-compressed name at source (active region) into target,
* decompressing it.

View File

@ -281,18 +281,13 @@ dns_rdata_toregion(const dns_rdata_t *rdata, isc_region_t *r);
isc_result_t
dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_buffer_t *source,
dns_decompress_t dctx, unsigned int options,
isc_buffer_t *target);
dns_decompress_t dctx, isc_buffer_t *target);
/*%<
* Copy the possibly-compressed rdata at source into the target region.
*
* Notes:
*\li Name decompression policy is controlled by 'dctx'.
*
* 'options'
*\li DNS_RDATA_DOWNCASE downcase domain names when they are copied
* into target.
*
* Requires:
*
*\li 'rdclass' and 'type' are valid.

View File

@ -2034,7 +2034,7 @@ read_one_rr(dns_journal_t *j) {
*/
isc_buffer_setactive(&j->it.source,
j->it.source.used - j->it.source.current);
CHECK(dns_name_fromwire(&j->it.name, &j->it.source, j->it.dctx, 0,
CHECK(dns_name_fromwire(&j->it.name, &j->it.source, j->it.dctx,
&j->it.target));
/*
@ -2066,7 +2066,7 @@ read_one_rr(dns_journal_t *j) {
isc_buffer_setactive(&j->it.source, rdlen);
dns_rdata_reset(&j->it.rdata);
CHECK(dns_rdata_fromwire(&j->it.rdata, rdclass, rdtype, &j->it.source,
j->it.dctx, 0, &j->it.target));
j->it.dctx, &j->it.target));
j->it.ttl = ttl;
j->it.xpos += sizeof(journal_rawrrhdr_t) + rrhdr.size;

View File

@ -2469,7 +2469,7 @@ load_raw(dns_loadctx_t *lctx) {
}
isc_buffer_setactive(&target, (unsigned int)namelen);
result = dns_name_fromwire(name, &target, dctx, 0, NULL);
result = dns_name_fromwire(name, &target, dctx, NULL);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
@ -2560,7 +2560,7 @@ load_raw(dns_loadctx_t *lctx) {
(unsigned int)rdlen);
result = dns_rdata_fromwire(
&rdata[i], rdatalist.rdclass, rdatalist.type,
&target, dctx, 0, &buf);
&target, dctx, &buf);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}

View File

@ -877,7 +877,7 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
*/
tries = 0;
while (tries < 2) {
result = dns_name_fromwire(name, source, dctx, 0, scratch);
result = dns_name_fromwire(name, source, dctx, scratch);
if (result == ISC_R_NOSPACE) {
tries++;
@ -922,7 +922,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t dctx,
/* XXX possibly change this to a while (tries < 2) loop */
for (;;) {
result = dns_rdata_fromwire(rdata, rdclass, rdtype, source,
dctx, 0, scratch);
dctx, scratch);
if (result == ISC_R_NOSPACE) {
if (tries == 0) {

View File

@ -1521,8 +1521,7 @@ set_offsets(const dns_name_t *name, unsigned char *offsets,
isc_result_t
dns_name_fromwire(dns_name_t *const name, isc_buffer_t *const source,
const dns_decompress_t dctx, unsigned int options,
isc_buffer_t *target) {
const dns_decompress_t dctx, isc_buffer_t *target) {
/*
* Copy the name at source into target, decompressing it.
*
@ -1574,7 +1573,6 @@ dns_name_fromwire(dns_name_t *const name, isc_buffer_t *const source,
* correct way to set our "consumed" variable.
*/
REQUIRE((options & DNS_NAME_DOWNCASE) == 0);
REQUIRE(VALID_NAME(name));
REQUIRE(BINDABLE(name));
REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||

View File

@ -992,7 +992,7 @@ dns_nsec3param_fromprivate(dns_rdata_t *src, dns_rdata_t *target,
isc_buffer_init(&buf2, buf, (unsigned int)buflen);
result = dns_rdata_fromwire(target, src->rdclass,
dns_rdatatype_nsec3param, &buf1,
DNS_DECOMPRESS_NEVER, 0, &buf2);
DNS_DECOMPRESS_NEVER, &buf2);
return (result == ISC_R_SUCCESS);
}

View File

@ -98,10 +98,9 @@
#define ARGS_FROMWIRE \
int rdclass, dns_rdatatype_t type, isc_buffer_t *source, \
dns_decompress_t dctx, unsigned int options, \
isc_buffer_t *target
dns_decompress_t dctx, isc_buffer_t *target
#define CALL_FROMWIRE rdclass, type, source, dctx, options, target
#define CALL_FROMWIRE rdclass, type, source, dctx, target
#define ARGS_TOWIRE \
dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target
@ -604,7 +603,7 @@ check_private(isc_buffer_t *source, dns_secalg_t alg) {
dns_fixedname_t fixed;
RETERR(dns_name_fromwire(dns_fixedname_initname(&fixed), source,
DNS_DECOMPRESS_DEFAULT, 0, NULL));
DNS_DECOMPRESS_DEFAULT, NULL));
/*
* There should be a public key or signature after the key name.
*/
@ -795,8 +794,7 @@ dns_rdata_toregion(const dns_rdata_t *rdata, isc_region_t *r) {
isc_result_t
dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_buffer_t *source,
dns_decompress_t dctx, unsigned int options,
isc_buffer_t *target) {
dns_decompress_t dctx, isc_buffer_t *target) {
isc_result_t result = ISC_R_NOTIMPLEMENTED;
isc_region_t region;
isc_buffer_t ss;
@ -915,7 +913,7 @@ rdata_validate(isc_buffer_t *src, isc_buffer_t *dest, dns_rdataclass_t rdclass,
isc_buffer_setactive(src, isc_buffer_usedlength(src));
result = dns_rdata_fromwire(NULL, rdclass, type, src,
DNS_DECOMPRESS_NEVER, 0, dest);
DNS_DECOMPRESS_NEVER, dest);
return (result);
}

View File

@ -270,7 +270,7 @@ fromwire_any_tsig(ARGS_FROMWIRE) {
* Algorithm Name.
*/
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
isc_buffer_activeregion(source, &sr);
/*

View File

@ -109,7 +109,7 @@ fromwire_ch_a(ARGS_FROMWIRE) {
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);

View File

@ -116,7 +116,7 @@ fromwire_afsdb(ARGS_FROMWIRE) {
memmove(tr.base, sr.base, 2);
isc_buffer_forward(source, 2);
isc_buffer_add(target, 2);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -225,8 +225,7 @@ fromwire_amtrelay(ARGS_FROMWIRE) {
RETERR(mem_tobuffer(target, region.base, 2));
isc_buffer_forward(source, 2);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options,
target));
return (dns_name_fromwire(&name, source, dctx, target));
default:
isc_buffer_forward(source, region.length);

View File

@ -371,7 +371,6 @@ fromwire_caa(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
/*
* Flags

View File

@ -124,7 +124,6 @@ fromwire_cert(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 6) {

View File

@ -74,7 +74,7 @@ fromwire_cname(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -89,7 +89,6 @@ fromwire_csync(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(options);
UNUSED(dctx);
/*

View File

@ -75,7 +75,7 @@ fromwire_dname(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, false);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -131,7 +131,6 @@ fromwire_doa(ARGS_FROMWIRE) {
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
REQUIRE(type == dns_rdatatype_doa);

View File

@ -163,7 +163,6 @@ generic_fromwire_ds(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);

View File

@ -74,7 +74,6 @@ fromwire_eui48(ARGS_FROMWIRE) {
REQUIRE(type == dns_rdatatype_eui48);
UNUSED(type);
UNUSED(options);
UNUSED(rdclass);
UNUSED(dctx);

View File

@ -77,7 +77,6 @@ fromwire_eui64(ARGS_FROMWIRE) {
REQUIRE(type == dns_rdatatype_eui64);
UNUSED(type);
UNUSED(options);
UNUSED(rdclass);
UNUSED(dctx);

View File

@ -70,7 +70,6 @@ fromwire_gpos(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
for (i = 0; i < 3; i++) {
RETERR(txt_fromwire(source, target));

View File

@ -58,7 +58,6 @@ fromwire_hinfo(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
RETERR(txt_fromwire(source, target));
return (txt_fromwire(source, target));

View File

@ -229,7 +229,7 @@ fromwire_hip(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, false);
while (isc_buffer_activelength(source) > 0) {
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
}
return (ISC_R_SUCCESS);
}

View File

@ -255,7 +255,7 @@ fromwire_ipseckey(ARGS_FROMWIRE) {
case 3:
RETERR(mem_tobuffer(target, region.base, 3));
isc_buffer_forward(source, 3);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
isc_buffer_activeregion(source, &region);
isc_buffer_forward(source, region.length);
if (region.length < 1) {

View File

@ -73,7 +73,6 @@ fromwire_isdn(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
RETERR(txt_fromwire(source, target));
if (buffer_empty(source)) {

View File

@ -234,7 +234,6 @@ generic_fromwire_key(ARGS_FROMWIRE) {
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 4) {

View File

@ -258,7 +258,6 @@ fromwire_keydata(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
isc_buffer_forward(source, sr.length);

View File

@ -85,7 +85,6 @@ fromwire_l32(ARGS_FROMWIRE) {
REQUIRE(type == dns_rdatatype_l32);
UNUSED(type);
UNUSED(options);
UNUSED(rdclass);
UNUSED(dctx);

View File

@ -83,7 +83,6 @@ fromwire_l64(ARGS_FROMWIRE) {
REQUIRE(type == dns_rdatatype_l64);
UNUSED(type);
UNUSED(options);
UNUSED(rdclass);
UNUSED(dctx);

View File

@ -566,7 +566,6 @@ fromwire_loc(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 1) {

View File

@ -98,7 +98,7 @@ fromwire_lp(ARGS_FROMWIRE) {
}
RETERR(mem_tobuffer(target, sregion.base, 2));
isc_buffer_forward(source, 2);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -73,7 +73,7 @@ fromwire_mb(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -73,7 +73,7 @@ fromwire_md(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -73,7 +73,7 @@ fromwire_mf(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -73,7 +73,7 @@ fromwire_mg(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -103,8 +103,8 @@ fromwire_minfo(ARGS_FROMWIRE) {
dns_name_init(&rmail, NULL);
dns_name_init(&email, NULL);
RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
return (dns_name_fromwire(&email, source, dctx, options, target));
RETERR(dns_name_fromwire(&rmail, source, dctx, target));
return (dns_name_fromwire(&email, source, dctx, target));
}
static isc_result_t

View File

@ -73,7 +73,7 @@ fromwire_mr(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -144,7 +144,7 @@ fromwire_mx(ARGS_FROMWIRE) {
}
RETERR(mem_tobuffer(target, sregion.base, 2));
isc_buffer_forward(source, 2);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -345,7 +345,7 @@ fromwire_naptr(ARGS_FROMWIRE) {
/*
* Replacement.
*/
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -83,7 +83,6 @@ fromwire_nid(ARGS_FROMWIRE) {
REQUIRE(type == dns_rdatatype_nid);
UNUSED(type);
UNUSED(options);
UNUSED(rdclass);
UNUSED(dctx);

View File

@ -84,7 +84,7 @@ fromwire_ns(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -190,7 +190,6 @@ fromwire_nsec3(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(options);
UNUSED(dctx);
isc_buffer_activeregion(source, &sr);

View File

@ -149,7 +149,6 @@ fromwire_nsec3param(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(options);
UNUSED(dctx);
isc_buffer_activeregion(source, &sr);

View File

@ -88,7 +88,7 @@ fromwire_nsec(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, false);
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
isc_buffer_activeregion(source, &sr);
RETERR(typemap_test(&sr, false));

View File

@ -47,7 +47,6 @@ fromwire_null(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
isc_buffer_forward(source, sr.length);

View File

@ -147,7 +147,7 @@ fromwire_nxt(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, false);
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
isc_buffer_activeregion(source, &sr);
if (sr.length > 0 && ((sr.base[0] & 0x80) != 0 || sr.length > 16 ||

View File

@ -75,7 +75,6 @@ fromwire_openpgpkey(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
/*
* Keyring.

View File

@ -104,7 +104,6 @@ fromwire_opt(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sregion);
if (sregion.length == 0) {

View File

@ -86,7 +86,7 @@ fromwire_ptr(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, true);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -104,8 +104,8 @@ fromwire_rp(ARGS_FROMWIRE) {
dns_name_init(&rmail, NULL);
dns_name_init(&email, NULL);
RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
return (dns_name_fromwire(&email, source, dctx, options, target));
RETERR(dns_name_fromwire(&rmail, source, dctx, target));
return (dns_name_fromwire(&email, source, dctx, target));
}
static isc_result_t

View File

@ -328,7 +328,7 @@ fromwire_rrsig(ARGS_FROMWIRE) {
* Signer.
*/
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
/*
* Sig.

View File

@ -112,7 +112,7 @@ fromwire_rt(ARGS_FROMWIRE) {
memmove(tregion.base, sregion.base, 2);
isc_buffer_forward(source, 2);
isc_buffer_add(target, 2);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -291,7 +291,7 @@ fromwire_sig(ARGS_FROMWIRE) {
* Signer.
*/
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
/*
* Sig.

View File

@ -112,7 +112,6 @@ fromwire_sink(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 3) {

View File

@ -170,8 +170,8 @@ fromwire_soa(ARGS_FROMWIRE) {
dns_name_init(&mname, NULL);
dns_name_init(&rname, NULL);
RETERR(dns_name_fromwire(&mname, source, dctx, options, target));
RETERR(dns_name_fromwire(&rname, source, dctx, options, target));
RETERR(dns_name_fromwire(&mname, source, dctx, target));
RETERR(dns_name_fromwire(&rname, source, dctx, target));
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);

View File

@ -132,7 +132,6 @@ fromwire_sshfp(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 2) {

View File

@ -93,8 +93,8 @@ fromwire_talink(ARGS_FROMWIRE) {
dns_name_init(&prev, NULL);
dns_name_init(&next, NULL);
RETERR(dns_name_fromwire(&prev, source, dctx, options, target));
return (dns_name_fromwire(&next, source, dctx, options, target));
RETERR(dns_name_fromwire(&prev, source, dctx, target));
return (dns_name_fromwire(&next, source, dctx, target));
}
static isc_result_t

View File

@ -260,7 +260,7 @@ fromwire_tkey(ARGS_FROMWIRE) {
* Algorithm.
*/
dns_name_init(&name, NULL);
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
/*
* Inception: 4

View File

@ -126,7 +126,6 @@ generic_fromwire_tlsa(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);

View File

@ -76,7 +76,6 @@ generic_fromwire_txt(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
do {
result = txt_fromwire(source, target);

View File

@ -105,7 +105,6 @@ fromwire_uri(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
/*
* Priority, weight

View File

@ -69,7 +69,6 @@ fromwire_x25(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length < 5 || sr.base[0] != (sr.length - 1)) {

View File

@ -148,7 +148,6 @@ fromwire_zonemd(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);

View File

@ -71,7 +71,6 @@ fromwire_hs_a(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);

View File

@ -196,7 +196,7 @@ fromwire_in_a6(ARGS_FROMWIRE) {
}
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -74,7 +74,6 @@ fromwire_in_a(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);

View File

@ -90,7 +90,6 @@ fromwire_in_aaaa(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);

View File

@ -193,7 +193,6 @@ fromwire_in_apl(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(rdclass);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
isc_buffer_availableregion(target, &tr);
@ -277,7 +276,7 @@ fromstruct_in_apl(ARGS_FROMSTRUCT) {
isc_buffer_add(&b, apl->apl_len);
isc_buffer_setactive(&b, apl->apl_len);
return (fromwire_in_apl(rdclass, type, &b, DNS_DECOMPRESS_DEFAULT,
false, target));
target));
}
static isc_result_t

View File

@ -149,7 +149,6 @@ fromwire_in_atma(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &region);

View File

@ -76,7 +76,6 @@ fromwire_in_dhcid(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(rdclass);
UNUSED(dctx);
UNUSED(options);
isc_buffer_activeregion(source, &sr);
if (sr.length == 0) {

View File

@ -66,7 +66,6 @@ fromwire_in_eid(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &region);

View File

@ -99,7 +99,7 @@ fromwire_in_kx(ARGS_FROMWIRE) {
}
RETERR(mem_tobuffer(target, sregion.base, 2));
isc_buffer_forward(source, 2);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -66,7 +66,6 @@ fromwire_in_nimloc(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &region);

View File

@ -78,7 +78,7 @@ fromwire_in_nsap_ptr(ARGS_FROMWIRE) {
dctx = dns_decompress_setpermitted(dctx, false);
dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -101,7 +101,6 @@ fromwire_in_nsap(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &region);

View File

@ -136,12 +136,12 @@ fromwire_in_px(ARGS_FROMWIRE) {
/*
* MAP822.
*/
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
/*
* MAPX400.
*/
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -166,7 +166,7 @@ fromwire_in_srv(ARGS_FROMWIRE) {
/*
* Target.
*/
return (dns_name_fromwire(&name, source, dctx, options, target));
return (dns_name_fromwire(&name, source, dctx, target));
}
static isc_result_t

View File

@ -824,7 +824,7 @@ generic_fromwire_in_svcb(ARGS_FROMWIRE) {
/*
* TargetName.
*/
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
RETERR(dns_name_fromwire(&name, source, dctx, target));
if (alias) {
return (ISC_R_SUCCESS);

View File

@ -217,7 +217,6 @@ fromwire_in_wks(ARGS_FROMWIRE) {
UNUSED(type);
UNUSED(dctx);
UNUSED(options);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sr);

View File

@ -64,7 +64,7 @@ new_bench(const uint8_t *data, size_t size) {
isc_buffer_setactive(&buf, size);
while (isc_buffer_consumedlength(&buf) < size) {
result = dns_name_fromwire(name, &buf, dctx, 0, NULL);
result = dns_name_fromwire(name, &buf, dctx, NULL);
if (result != ISC_R_SUCCESS) {
isc_buffer_forward(&buf, 1);
}

View File

@ -180,13 +180,13 @@ compress_test(const dns_name_t *name1, const dns_name_t *name2,
dns_name_init(&name, NULL);
RUNTIME_CHECK(isc_buffer_getuint16(&source) == 0xEAD);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, 0, &target) ==
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, &target) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, 0, &target) ==
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, &target) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, 0, &target) ==
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, &target) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, 0, &target) ==
RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, &target) ==
ISC_R_SUCCESS);
assert_int_equal(target.used, expanded_length);
@ -863,7 +863,7 @@ ISC_RUN_TEST_IMPL(fromwire_thread(void *arg) {
isc_buffer_setactive(&source, sizeof(data));
dns_name_init(&name, NULL);
(void)dns_name_fromwire(&name, &source, &dctx, 0, &target);
(void)dns_name_fromwire(&name, &source, &dctx, &target);
}
return (NULL);

View File

@ -150,7 +150,7 @@ wire_to_rdata(const unsigned char *src, size_t srclen, dns_rdataclass_t rdclass,
* Try converting input data into uncompressed wire form.
*/
result = dns_rdata_fromwire(rdata, rdclass, type, &source,
DNS_DECOMPRESS_ALWAYS, 0, &target);
DNS_DECOMPRESS_ALWAYS, &target);
return (result);
}