Merge branch '899-eid-totext-is-broken' into 'master'

EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1571
This commit is contained in:
Mark Andrews 2019-03-21 05:09:50 -04:00
commit ffba2eb60d
3 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,6 @@
5193. [bug] EID and NIMLOC failed to do multi-line output
correctly. [GL #899]
5192. [placeholder]
5191. [placeholder]

View file

@ -41,12 +41,19 @@ totext_in_eid(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &region);
if (tctx->width == 0) {
return (isc_hex_totext(&region, 60, "", target));
} else {
return (isc_hex_totext(&region, 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(&region, 60, "", target));
} else {
RETERR(isc_hex_totext(&region, 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

View file

@ -41,12 +41,19 @@ totext_in_nimloc(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &region);
if (tctx->width == 0) {
return (isc_hex_totext(&region, 60, "", target));
} else {
return (isc_hex_totext(&region, 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(&region, 60, "", target));
} else {
RETERR(isc_hex_totext(&region, 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