]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4057. [bug] 'dnssec-dsfromkey -T 0' failed to add ttl field.
authorMark Andrews <marka@isc.org>
Fri, 6 Feb 2015 06:01:50 +0000 (17:01 +1100)
committerMark Andrews <marka@isc.org>
Fri, 6 Feb 2015 06:03:01 +0000 (17:03 +1100)
                        [RT #38565]

(cherry picked from commit e785f9c1c7d838b9a773a757210388130eba5c4a)

CHANGES
bin/dnssec/dnssec-dsfromkey.c

diff --git a/CHANGES b/CHANGES
index 0c9f394e448b740ecb0cda15d463be8631127ba4..e7e62df715f82a568582e9388ec6e07587c6c58f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4057.  [bug]           'dnssec-dsfromkey -T 0' failed to add ttl field.
+                       [RT #38565]
+
 4053.  [security]      Revoking a managed trust anchor and supplying
                        an untrusted replacement could cause named
                        to crash with an assertion failure.
index eb9f24d59d4f2b3af5c995b11a0e53b725892c8a..8c1bd86f16d9fface45f1377a3878b1c8720b0de 100644 (file)
@@ -61,6 +61,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) {
@@ -295,7 +296,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);
@@ -415,6 +416,7 @@ main(int argc, char **argv) {
                        usekeyset = ISC_TRUE;
                        break;
                case 'T':
+                       emitttl = ISC_TRUE;
                        ttl = atol(isc_commandline_argument);
                        break;
                case 'v':