]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
allow named remote-servers list with key or tls
authorColin Vidal <colin@isc.org>
Wed, 19 Nov 2025 16:34:16 +0000 (17:34 +0100)
committerColin Vidal <colin@isc.org>
Fri, 28 Nov 2025 14:15:46 +0000 (15:15 +0100)
The remote-servers clause enables the following pattern:

remote-servers a { 1.2.3.4; ... };
remote-servers b { a key foo; };

However, `check.c` was explicitly throwing an error if a `key` or `tls`
was provided after a named server-list. Remove this check, as this is a
valid use case.

(cherry picked from commit 046c6819b24ebd7d087ed33518b71b0ff23d9918)

lib/isccfg/check.c

index 74a48da8fdca63a945419d0901bec54ca1a9e1ed..842b9abb16467acaec2b48775ccf38c6443d1851 100644 (file)
@@ -2654,22 +2654,6 @@ resume:
                        }
                        continue;
                }
-               if (!cfg_obj_isvoid(key)) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "unexpected token '%s'",
-                                   cfg_obj_asstring(key));
-                       if (result == ISC_R_SUCCESS) {
-                               result = ISC_R_FAILURE;
-                       }
-               }
-               if (!cfg_obj_isvoid(tls)) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "unexpected token '%s'",
-                                   cfg_obj_asstring(tls));
-                       if (result == ISC_R_SUCCESS) {
-                               result = ISC_R_FAILURE;
-                       }
-               }
                listname = cfg_obj_asstring(addr);
                symvalue.as_cpointer = addr;
                tresult = isc_symtab_define(symtab, listname, 1, symvalue,