From: Michał Kępień Date: Wed, 1 Feb 2023 10:22:59 +0000 (+0100) Subject: Fix 'view' variable scope in load_configuration() X-Git-Tag: v9.19.10~3^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=183cd1bbe528886f30485b84f1675bb4708b6ec9;p=thirdparty%2Fbind9.git Fix 'view' variable scope in load_configuration() Commit b69e783164cd50e3306364668558e460617ee8fc changed the scope of the local 'view' variable in load_configuration(), but the code section guarded by the #ifdef USE_DNSRPS directive was not adjusted accordingly, causing build errors for DNSRPS-enabled builds. Fix the latter by declaring the 'view' variable inside the loop in the DNSRPS-specific block of code. --- diff --git a/bin/named/server.c b/bin/named/server.c index 3bffb2d0618..b57976ff319 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -9720,7 +9720,7 @@ load_configuration(const char *filename, named_server_t *server, * Start and connect to the DNS Response Policy Service * daemon, dnsrpzd, for each view that uses DNSRPS. */ - for (view = ISC_LIST_HEAD(server->viewlist); view != NULL; + for (dns_view_t *view = ISC_LIST_HEAD(server->viewlist); view != NULL; view = ISC_LIST_NEXT(view, link)) { result = dns_dnsrps_connect(view->rpzs);