2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Merge branch '372-smimea-and-tlsa-methods-incorrectly-use-txt-type' into 'master'

Resolve "smimea and tlsa methods incorrectly use txt type"

Closes #372

See merge request isc-projects/bind9!458
This commit is contained in:
Mark Andrews
2018-08-01 18:23:53 -04:00
2 changed files with 12 additions and 12 deletions

View File

@@ -79,24 +79,24 @@ fromstruct_smimea(ARGS_FROMSTRUCT) {
static inline isc_result_t
tostruct_smimea(ARGS_TOSTRUCT) {
dns_rdata_txt_t *txt = target;
dns_rdata_smimea_t *smimea = target;
REQUIRE(rdata->type == dns_rdatatype_smimea);
REQUIRE(target != NULL);
txt->common.rdclass = rdata->rdclass;
txt->common.rdtype = rdata->type;
ISC_LINK_INIT(&txt->common, link);
smimea->common.rdclass = rdata->rdclass;
smimea->common.rdtype = rdata->type;
ISC_LINK_INIT(&smimea->common, link);
return (generic_tostruct_tlsa(rdata, target, mctx));
}
static inline void
freestruct_smimea(ARGS_FREESTRUCT) {
dns_rdata_txt_t *txt = source;
dns_rdata_smimea_t *smimea = source;
REQUIRE(source != NULL);
REQUIRE(txt->common.rdtype == dns_rdatatype_smimea);
REQUIRE(smimea->common.rdtype == dns_rdatatype_smimea);
generic_freestruct_tlsa(source);
}

View File

@@ -257,24 +257,24 @@ fromstruct_tlsa(ARGS_FROMSTRUCT) {
static inline isc_result_t
tostruct_tlsa(ARGS_TOSTRUCT) {
dns_rdata_txt_t *txt = target;
dns_rdata_tlsa_t *tlsa = target;
REQUIRE(rdata->type == dns_rdatatype_tlsa);
REQUIRE(target != NULL);
txt->common.rdclass = rdata->rdclass;
txt->common.rdtype = rdata->type;
ISC_LINK_INIT(&txt->common, link);
tlsa->common.rdclass = rdata->rdclass;
tlsa->common.rdtype = rdata->type;
ISC_LINK_INIT(&tlsa->common, link);
return (generic_tostruct_tlsa(rdata, target, mctx));
}
static inline void
freestruct_tlsa(ARGS_FREESTRUCT) {
dns_rdata_txt_t *txt = source;
dns_rdata_tlsa_t *tlsa = source;
REQUIRE(source != NULL);
REQUIRE(txt->common.rdtype == dns_rdatatype_tlsa);
REQUIRE(tlsa->common.rdtype == dns_rdatatype_tlsa);
generic_freestruct_tlsa(source);
}