From: Mark Andrews Date: Wed, 2 Dec 2009 23:36:35 +0000 (+0000) Subject: CHANGES X-Git-Tag: v9.4.3-P1~1^10~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5b9974f4a7287f8ca3a4933fda327962f2288f1;p=thirdparty%2Fbind9.git CHANGES --- diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 724f27bc8d3..b07b1dd90e9 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dispatch.c,v 1.116.18.41 2009/01/19 23:46:14 tbox Exp $ */ +/* $Id: dispatch.c,v 1.116.18.42 2009/12/02 23:36:35 marka Exp $ */ /*! \file */ @@ -1932,8 +1932,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) {