4057. [bug] 'dnssec-dsfromkey -T 0' failed to add ttl field.

[RT #38565]
This commit is contained in:
Mark Andrews
2015-02-06 17:01:50 +11:00
parent b1de3a999c
commit e785f9c1c7
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
4057. [bug] 'dnssec-dsfromkey -T 0' failed to add ttl field.
[RT #38565]
4056. [bug] Expanded automatic testing of trust anchor
management and fixed several small bugs including
a memory leak and a possible loss of key state

View File

@@ -65,6 +65,7 @@ static dns_fixedname_t fixed;
static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL;
static isc_uint32_t ttl;
static isc_boolean_t emitttl = ISC_FALSE;
static isc_result_t
initname(char *setname) {
@@ -299,7 +300,7 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
isc_buffer_usedregion(&nameb, &r);
printf("%.*s ", (int)r.length, r.base);
if (ttl != 0U)
if (emitttl)
printf("%u ", ttl);
isc_buffer_usedregion(&classb, &r);
@@ -422,6 +423,7 @@ main(int argc, char **argv) {
usekeyset = ISC_TRUE;
break;
case 'T':
emitttl = ISC_TRUE;
ttl = atol(isc_commandline_argument);
break;
case 'v':