mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +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:
@@ -79,24 +79,24 @@ fromstruct_smimea(ARGS_FROMSTRUCT) {
|
|||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
tostruct_smimea(ARGS_TOSTRUCT) {
|
tostruct_smimea(ARGS_TOSTRUCT) {
|
||||||
dns_rdata_txt_t *txt = target;
|
dns_rdata_smimea_t *smimea = target;
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_smimea);
|
REQUIRE(rdata->type == dns_rdatatype_smimea);
|
||||||
REQUIRE(target != NULL);
|
REQUIRE(target != NULL);
|
||||||
|
|
||||||
txt->common.rdclass = rdata->rdclass;
|
smimea->common.rdclass = rdata->rdclass;
|
||||||
txt->common.rdtype = rdata->type;
|
smimea->common.rdtype = rdata->type;
|
||||||
ISC_LINK_INIT(&txt->common, link);
|
ISC_LINK_INIT(&smimea->common, link);
|
||||||
|
|
||||||
return (generic_tostruct_tlsa(rdata, target, mctx));
|
return (generic_tostruct_tlsa(rdata, target, mctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
freestruct_smimea(ARGS_FREESTRUCT) {
|
freestruct_smimea(ARGS_FREESTRUCT) {
|
||||||
dns_rdata_txt_t *txt = source;
|
dns_rdata_smimea_t *smimea = source;
|
||||||
|
|
||||||
REQUIRE(source != NULL);
|
REQUIRE(source != NULL);
|
||||||
REQUIRE(txt->common.rdtype == dns_rdatatype_smimea);
|
REQUIRE(smimea->common.rdtype == dns_rdatatype_smimea);
|
||||||
|
|
||||||
generic_freestruct_tlsa(source);
|
generic_freestruct_tlsa(source);
|
||||||
}
|
}
|
||||||
|
@@ -257,24 +257,24 @@ fromstruct_tlsa(ARGS_FROMSTRUCT) {
|
|||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
tostruct_tlsa(ARGS_TOSTRUCT) {
|
tostruct_tlsa(ARGS_TOSTRUCT) {
|
||||||
dns_rdata_txt_t *txt = target;
|
dns_rdata_tlsa_t *tlsa = target;
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_tlsa);
|
REQUIRE(rdata->type == dns_rdatatype_tlsa);
|
||||||
REQUIRE(target != NULL);
|
REQUIRE(target != NULL);
|
||||||
|
|
||||||
txt->common.rdclass = rdata->rdclass;
|
tlsa->common.rdclass = rdata->rdclass;
|
||||||
txt->common.rdtype = rdata->type;
|
tlsa->common.rdtype = rdata->type;
|
||||||
ISC_LINK_INIT(&txt->common, link);
|
ISC_LINK_INIT(&tlsa->common, link);
|
||||||
|
|
||||||
return (generic_tostruct_tlsa(rdata, target, mctx));
|
return (generic_tostruct_tlsa(rdata, target, mctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
freestruct_tlsa(ARGS_FREESTRUCT) {
|
freestruct_tlsa(ARGS_FREESTRUCT) {
|
||||||
dns_rdata_txt_t *txt = source;
|
dns_rdata_tlsa_t *tlsa = source;
|
||||||
|
|
||||||
REQUIRE(source != NULL);
|
REQUIRE(source != NULL);
|
||||||
REQUIRE(txt->common.rdtype == dns_rdatatype_tlsa);
|
REQUIRE(tlsa->common.rdtype == dns_rdatatype_tlsa);
|
||||||
|
|
||||||
generic_freestruct_tlsa(source);
|
generic_freestruct_tlsa(source);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user