]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Reset parser before parsing of internal trust anchor
authorPetr Menšík <pemensik@redhat.com>
Thu, 11 Aug 2022 09:41:30 +0000 (11:41 +0200)
committerMark Andrews <marka@isc.org>
Fri, 19 Aug 2022 04:36:47 +0000 (14:36 +1000)
It might be reused if /etc/bind.keys exists, but failed correct parsing.
Release traces of previous parsing attempt of different data.

bin/delv/delv.c

index bfdc975e88140f71581d7f40dd875ccf1114c622..f83501578cd60240e1f474c0f6a64163a0f16f90 100644 (file)
@@ -845,6 +845,7 @@ setup_dnsseckeys(dns_client_t *client) {
 
                isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
                isc_buffer_add(&b, sizeof(anchortext) - 1);
+               cfg_parser_reset(parser);
                result = cfg_parse_buffer(parser, &b, NULL, 0,
                                          &cfg_type_bindkeys, 0, &bindkeys);
                if (result != ISC_R_SUCCESS) {