]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2797. [bug] Don't decrement the dispatch manager's maxbuffers.
authorMark Andrews <marka@isc.org>
Wed, 2 Dec 2009 23:26:28 +0000 (23:26 +0000)
committerMark Andrews <marka@isc.org>
Wed, 2 Dec 2009 23:26:28 +0000 (23:26 +0000)
                        [RT #20613]

CHANGES
lib/dns/dispatch.c

diff --git a/CHANGES b/CHANGES
index f0b4ba6ed4336459cbb8ff5f5fe88815e888d781..9a38b15ab121c346b78d86bdc552b52f2d906570 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 
        --- 9.6.2b1 released ---
 
+2797.  [bug]           Don't decrement the dispatch manager's maxbuffers.
+                       [RT #20613]
+
 2790.  [bug]           Handle DS queries to stub zones. [RT #20440]
 
 2789.   [bug]           Fixed an INSIST in dispatch.c [RT #20576]
index 555e1920e458c68643d152abfecb618fb267d96f..1d04961277bec2a7d74df67016f879b0fa10d922 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dispatch.c,v 1.155.12.10 2009/11/26 02:35:43 marka Exp $ */
+/* $Id: dispatch.c,v 1.155.12.11 2009/12/02 23:26:28 marka Exp $ */
 
 /*! \file */
 
@@ -2056,8 +2056,18 @@ dns_dispatchmgr_setudp(dns_dispatchmgr_t *mgr,
 
        /* Create or adjust buffer pool */
        if (mgr->bpool != NULL) {
-               isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
-               mgr->maxbuffers = maxbuffers;
+               /*
+                * We only increase the maxbuffers to avoid accidental buffer
+                * shortage.  Ideally we'd separate the manager-wide maximum
+                * from per-dispatch limits and respect the latter within the
+                * global limit.  But at this moment that's deemed to be
+                * overkilling and isn't worth additional implementation
+                * complexity.
+                */
+               if (maxbuffers > mgr->maxbuffers) {
+                       isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
+                       mgr->maxbuffers = maxbuffers;
+               }
        } else {
                result = isc_mempool_create(mgr->mctx, buffersize, &mgr->bpool);
                if (result != ISC_R_SUCCESS) {