From f1b0e9107d5fc7669920b76b4e32f93e9d16c85c Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 3 Aug 1999 01:21:23 +0000 Subject: [PATCH] additional data support --- lib/dns/rdata/generic/mx_15.c | 13 +++++++++---- lib/dns/rdata/generic/ns_2.c | 12 ++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c index 35dd21eb23..d8ff7f2a51 100644 --- a/lib/dns/rdata/generic/mx_15.c +++ b/lib/dns/rdata/generic/mx_15.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: mx_15.c,v 1.17 1999/08/02 22:18:00 halley Exp $ */ + /* $Id: mx_15.c,v 1.18 1999/08/03 01:21:23 halley Exp $ */ #ifndef RDATA_GENERIC_MX_15_C #define RDATA_GENERIC_MX_15_C @@ -199,12 +199,17 @@ static dns_result_t additionaldata_mx(dns_rdata_t *rdata, dns_additionaldatafunc_t add, void *arg) { + dns_name_t name; + isc_region_t region; + REQUIRE(rdata->type == 15); - (void)add; - (void)arg; + dns_name_init(&name, NULL); + dns_rdata_toregion(rdata, ®ion); + isc_region_consume(®ion, 2); + dns_name_fromregion(&name, ®ion); - return (DNS_R_SUCCESS); + return ((add)(arg, &name, dns_rdatatype_a)); } #endif /* RDATA_GENERIC_MX_15_C */ diff --git a/lib/dns/rdata/generic/ns_2.c b/lib/dns/rdata/generic/ns_2.c index f6c90c665e..670b3af65d 100644 --- a/lib/dns/rdata/generic/ns_2.c +++ b/lib/dns/rdata/generic/ns_2.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: ns_2.c,v 1.14 1999/08/02 22:18:00 halley Exp $ */ + /* $Id: ns_2.c,v 1.15 1999/08/03 01:21:23 halley Exp $ */ #ifndef RDATA_GENERIC_NS_2_C #define RDATA_GENERIC_NS_2_C @@ -172,12 +172,16 @@ static dns_result_t additionaldata_ns(dns_rdata_t *rdata, dns_additionaldatafunc_t add, void *arg) { + dns_name_t name; + isc_region_t region; + REQUIRE(rdata->type == 2); - (void)add; - (void)arg; + dns_name_init(&name, NULL); + dns_rdata_toregion(rdata, ®ion); + dns_name_fromregion(&name, ®ion); - return (DNS_R_SUCCESS); + return ((add)(arg, &name, dns_rdatatype_a)); } #endif /* RDATA_GENERIC_NS_2_C */