diff --git a/CHANGES b/CHANGES index c56d41da42..1289054dc3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5193. [bug] EID and NIMLOC failed to do multi-line output + correctly. [GL #899] + 5192. [placeholder] 5191. [placeholder] 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