]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Part2: don't attach/detach view wpk-less-refs
authorWitold Kręcicki <wpk@isc.org>
Thu, 16 May 2019 16:16:40 +0000 (18:16 +0200)
committerWitold Kręcicki <wpk@isc.org>
Thu, 16 May 2019 16:16:40 +0000 (18:16 +0200)
bin/named/server.c
lib/ns/client.c

index 5653358aba0575928704f0df1d988877c1338309..a64e85732043d84119c408a628d18dc61137566e 100644 (file)
@@ -9690,7 +9690,7 @@ get_matching_view(isc_netaddr_t *srcaddr, isc_netaddr_t *destaddr,
                            !(view->matchrecursiveonly &&
                              (message->flags & DNS_MESSAGEFLAG_RD) == 0))
                        {
-                               dns_view_attach(view, viewp);
+                               *viewp = view; // dns_view_attach(view, viewp);
                                return (ISC_R_SUCCESS);
                        }
                }
index c07e57cad14a598cd2e14742e7225a214f530d22..c854e30e001ef28a4382c63601ea67108cf648ec 100644 (file)
@@ -462,8 +462,10 @@ exit_check(ns_client_t *client) {
         * Keep the view attached until any outstanding updates complete.
         */
        if (client->nupdates == 0 &&
-           client->newstate == NS_CLIENTSTATE_FREED && client->view != NULL)
-               dns_view_detach(&client->view);
+           client->newstate == NS_CLIENTSTATE_FREED && client->view != NULL) {
+               client->view = NULL;
+               // dns_view_detach(&client->view);
+       }
 
        if (client->state == NS_CLIENTSTATE_WORKING ||
            client->state == NS_CLIENTSTATE_RECURSING)
@@ -893,7 +895,8 @@ ns_client_endrequest(ns_client_t *client) {
                        dns_adb_flush(client->view->adb);
                }
 #endif
-               dns_view_detach(&client->view);
+//             dns_view_detach(&client->view);
+               client->view = NULL;
        }
        if (client->opt != NULL) {
                INSIST(dns_rdataset_isassociated(client->opt));