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

EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1736
This commit is contained in:
Mark Andrews 2019-03-21 05:40:45 -04:00
commit e4bd0c00e2
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]
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
5187. [test] Set time zone before running any tests in dnstap_test.

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