Don't insert 2nd space between NSEC3 nexthash and typemap fields
(cherry picked from commit d4ea1edd2c)
This commit is contained in:
committed by
Mark Andrews
parent
24dd75db91
commit
2420b8f5fc
+1
-1
@@ -511,7 +511,7 @@ typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx,
|
||||
{
|
||||
unsigned int i, j, k;
|
||||
unsigned int window, len;
|
||||
isc_boolean_t first = ISC_FALSE;
|
||||
isc_boolean_t first = ISC_TRUE;
|
||||
|
||||
for (i = 0; i < sr->length; i += len) {
|
||||
if (tctx != NULL &&
|
||||
|
||||
@@ -74,6 +74,12 @@ totext_csync(ARGS_TOTEXT) {
|
||||
snprintf(buf, sizeof(buf), "%lu", num);
|
||||
RETERR(str_totext(buf, target));
|
||||
|
||||
/*
|
||||
* Don't leave a trailing space when there's no typemap present.
|
||||
*/
|
||||
if (sr.length > 0) {
|
||||
RETERR(str_totext(" ", target));
|
||||
}
|
||||
return (typemap_totext(&sr, NULL, target));
|
||||
}
|
||||
|
||||
|
||||
@@ -168,9 +168,9 @@ totext_nsec3(ARGS_TOTEXT) {
|
||||
/*
|
||||
* Don't leave a trailing space when there's no typemap present.
|
||||
*/
|
||||
if (((tctx->flags & DNS_STYLEFLAG_MULTILINE) == 0) && (sr.length > 0))
|
||||
if (((tctx->flags & DNS_STYLEFLAG_MULTILINE) == 0) && (sr.length > 0)) {
|
||||
RETERR(str_totext(" ", target));
|
||||
|
||||
}
|
||||
RETERR(typemap_totext(&sr, tctx, target));
|
||||
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
|
||||
|
||||
@@ -70,6 +70,12 @@ totext_nsec(ARGS_TOTEXT) {
|
||||
dns_name_fromregion(&name, &sr);
|
||||
isc_region_consume(&sr, name_length(&name));
|
||||
RETERR(dns_name_totext(&name, ISC_FALSE, target));
|
||||
/*
|
||||
* Don't leave a trailing space when there's no typemap present.
|
||||
*/
|
||||
if (sr.length > 0) {
|
||||
RETERR(str_totext(" ", target));
|
||||
}
|
||||
return (typemap_totext(&sr, NULL, target));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user