From c52dfb2063537da781bf7975930c35b47fa2a58e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 28 Feb 2019 15:39:37 +1100 Subject: [PATCH 1/2] add brackets for multi-line output (cherry picked from commit 40a770b9329b2b00ab0e5d9011a0bad43f4e7886) --- lib/dns/rdata/in_1/eid_31.c | 17 ++++++++++++----- lib/dns/rdata/in_1/nimloc_32.c | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/dns/rdata/in_1/eid_31.c b/lib/dns/rdata/in_1/eid_31.c index 9768d383a6..e22ac4ae7a 100644 --- a/lib/dns/rdata/in_1/eid_31.c +++ b/lib/dns/rdata/in_1/eid_31.c @@ -41,12 +41,19 @@ totext_in_eid(ARGS_TOTEXT) { dns_rdata_toregion(rdata, ®ion); - if (tctx->width == 0) { - return (isc_hex_totext(®ion, 60, "", target)); - } else { - return (isc_hex_totext(®ion, tctx->width - 2, - tctx->linebreak, target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) { + RETERR(str_totext("( ", target)); } + if (tctx->width == 0) { + RETERR(isc_hex_totext(®ion, 60, "", target)); + } else { + RETERR(isc_hex_totext(®ion, tctx->width - 2, + tctx->linebreak, target)); + } + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) { + RETERR(str_totext(" )", target)); + } + return (ISC_R_SUCCESS); } static inline isc_result_t diff --git a/lib/dns/rdata/in_1/nimloc_32.c b/lib/dns/rdata/in_1/nimloc_32.c index bf7429232b..1070a4e8c0 100644 --- a/lib/dns/rdata/in_1/nimloc_32.c +++ b/lib/dns/rdata/in_1/nimloc_32.c @@ -41,12 +41,19 @@ totext_in_nimloc(ARGS_TOTEXT) { dns_rdata_toregion(rdata, ®ion); - if (tctx->width == 0) { - return (isc_hex_totext(®ion, 60, "", target)); - } else { - return (isc_hex_totext(®ion, tctx->width - 2, - tctx->linebreak, target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) { + RETERR(str_totext("( ", target)); } + if (tctx->width == 0) { + RETERR(isc_hex_totext(®ion, 60, "", target)); + } else { + RETERR(isc_hex_totext(®ion, tctx->width - 2, + tctx->linebreak, target)); + } + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) { + RETERR(str_totext(" )", target)); + } + return (ISC_R_SUCCESS); } static inline isc_result_t From 2818a83df9918d580a07a27207b66f70627c1acb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 21 Mar 2019 17:42:13 +1100 Subject: [PATCH 2/2] add CHANGES (cherry picked from commit c20b89fcf8c3e40818ac61a0235ed977db70427a) --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 74a8d0c5ba..81d3e0e30f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5193. [bug] EID and NIMLOC failed to do multi-line output + correctly. [GL #899] + 5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945] 5187. [test] Set time zone before running any tests in dnstap_test.