From 96472386cf82b106e766118cc611f746053af9b7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:26:59 +0000 Subject: import bind-9.9.4-61.el7 --- diff --git a/SOURCES/bind93-rh726120.patch b/SOURCES/bind93-rh726120.patch new file mode 100644 index 0000000..5eb11ee --- /dev/null +++ b/SOURCES/bind93-rh726120.patch @@ -0,0 +1,26 @@ +From 23c33ea76e916cc16e354faa218b6a0ca6385d00 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= +Date: Tue, 5 Dec 2017 16:33:08 +0100 +Subject: [PATCH] Fix bug #726120 + +--- + bin/dig/dighost.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c +index 42a2fe2..3a066c6 100644 +--- a/bin/dig/dighost.c ++++ b/bin/dig/dighost.c +@@ -3416,7 +3416,8 @@ recv_done(isc_task_t *task, isc_event_t *event) { + return; + } + if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) || +- (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse)) ++ (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && ++ msg->rcode != dns_rcode_noerror && l->recurse)) + { + dig_query_t *next = ISC_LIST_NEXT(query, link); + if (l->current_query == query) +-- +2.9.5 + diff --git a/SOURCES/bind99-rh1464850-2.patch b/SOURCES/bind99-rh1464850-2.patch new file mode 100644 index 0000000..6c4d07c --- /dev/null +++ b/SOURCES/bind99-rh1464850-2.patch @@ -0,0 +1,102 @@ +From a58f31659a924c59f6342d79d2c19ee956453d82 Mon Sep 17 00:00:00 2001 +From: Mark Andrews +Date: Sat, 18 Oct 2014 12:40:13 +1100 +Subject: [PATCH 2/2] 3980. [bug] Improve --with-tuning=large by + self tuning of SO_RCVBUF size. [RT #37187] + +(cherry picked from commit 871f3c8beeb2134b17414ec167b90a57adb8e122) +--- + lib/isc/unix/socket.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 61 insertions(+), 5 deletions(-) + +diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c +index af0c3bc..90953ff 100644 +--- a/lib/isc/unix/socket.c ++++ b/lib/isc/unix/socket.c +@@ -2245,6 +2245,62 @@ free_socket(isc__socket_t **socketp) { + *socketp = NULL; + } + ++#ifdef SO_RCVBUF ++static isc_once_t rcvbuf_once = ISC_ONCE_INIT; ++static int rcvbuf = RCVBUFSIZE; ++ ++static void ++set_rcvbuf(void) { ++ int fd; ++ int max = rcvbuf, min; ++ ISC_SOCKADDR_LEN_T len; ++ ++ fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ++#if defined(ISC_PLATFORM_HAVEIPV6) ++ if (fd == -1) { ++ switch (errno) { ++ case EPROTONOSUPPORT: ++ case EPFNOSUPPORT: ++ case EAFNOSUPPORT: ++ /* ++ * Linux 2.2 (and maybe others) return EINVAL instead of ++ * EAFNOSUPPORT. ++ */ ++ case EINVAL: ++ fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); ++ break; ++ } ++ } ++#endif ++ if (fd == -1) ++ return; ++ ++ len = sizeof(min); ++ if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&min, &len) >= 0 && ++ min < rcvbuf) { ++ again: ++ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf, ++ sizeof(rcvbuf)) == -1) { ++ if (errno == ENOBUFS && rcvbuf > min) { ++ max = rcvbuf - 1; ++ rcvbuf = (rcvbuf + min) / 2; ++ goto again; ++ } else { ++ rcvbuf = min; ++ goto cleanup; ++ } ++ } else ++ min = rcvbuf; ++ if (min != max) { ++ rcvbuf = max; ++ goto again; ++ } ++ } ++ cleanup: ++ close (fd); ++} ++#endif ++ + #ifdef SO_BSDCOMPAT + /* + * This really should not be necessary to do. Having to workout +@@ -2609,15 +2665,15 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock, + #if defined(SO_RCVBUF) + optlen = sizeof(size); + if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, +- (void *)&size, &optlen) >= 0 && +- size < RCVBUFSIZE) { +- size = RCVBUFSIZE; ++ (void *)&size, &optlen) >= 0 && size < rcvbuf) { ++ RUNTIME_CHECK(isc_once_do(&rcvbuf_once, ++ set_rcvbuf) == ISC_R_SUCCESS); + if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, +- (void *)&size, sizeof(size)) == -1) { ++ (void *)&rcvbuf, sizeof(rcvbuf)) == -1) { + isc__strerror(errno, strbuf, sizeof(strbuf)); + UNEXPECTED_ERROR(__FILE__, __LINE__, + "setsockopt(%d, SO_RCVBUF, %d) %s: %s", +- sock->fd, size, ++ sock->fd, rcvbuf, + isc_msgcat_get(isc_msgcat, + ISC_MSGSET_GENERAL, + ISC_MSG_FAILED, +-- +2.9.5 + diff --git a/SOURCES/bind99-rh1464850.patch b/SOURCES/bind99-rh1464850.patch new file mode 100644 index 0000000..f96db9a --- /dev/null +++ b/SOURCES/bind99-rh1464850.patch @@ -0,0 +1,1849 @@ +From b154e9fd7a4acc87435f858d43b8c234885a8763 Mon Sep 17 00:00:00 2001 +From: Evan Hunt +Date: Tue, 18 Feb 2014 22:36:14 -0800 +Subject: [PATCH 1/2] add "--with-tuning=large" option + +3745. [func] "configure --with-tuning=large" adjusts various + compiled-in constants and default settings to + values suited to large servers with abundant + memory. [RT #29538] + +(cherry picked from commit 6a3fa181d1253db5191139e20231512eebaddeeb) +--- + README | 8 + + bin/named/bind9.ver3.xsl.h | 6 +- + bin/named/interfacemgr.c | 9 +- + bin/named/named.docbook | 3 + + bin/named/server.c | 21 +- + bin/named/update.c | 2 +- + config.h.in | 3 + + configure | 1064 ++++++++++++++++++++++++++++++++++++-------- + configure.in | 25 ++ + lib/dns/client.c | 8 +- + lib/isc/unix/socket.c | 12 + + 11 files changed, 975 insertions(+), 186 deletions(-) + +diff --git a/README b/README +index b22e9ce..7451acb 100644 +--- a/README ++++ b/README +@@ -221,6 +221,14 @@ Building + To build shared libraries, specify "--with-libtool" on the + configure command line. + ++ Certain compiled-in constants and default settings can be ++ increased to values better suited to large servers with abundant ++ memory resources (e.g, 64-bit servers with 12G or more of memory) ++ by specifying "--with-tuning=large" on the configure command ++ line. This can improve performance on big servers, but will ++ consume more memory and may degrade performance on smaller ++ systems. ++ + For the server to support DNSSEC, you need to build it + with crypto support. You must have OpenSSL 0.9.5a + or newer installed and specify "--with-openssl" on the +diff --git a/bin/named/bind9.ver3.xsl.h b/bin/named/bind9.ver3.xsl.h +index c55714a..8c0a4a9 100644 +--- a/bin/named/bind9.ver3.xsl.h ++++ b/bin/named/bind9.ver3.xsl.h +@@ -210,7 +210,7 @@ static char xslmsg[] = + "

Incoming Requests

\n" + " \n" + " \n" +- "
[graph incoming requests]
\n" ++ "
[no incoming requests]
\n" + "
\n" + " \n" + " \n" +@@ -235,7 +235,7 @@ static char xslmsg[] = + "

Incoming Queries by Type

\n" + " \n" + " \n" +- "
[graph incoming qtypes]
\n" ++ "
[no incoming queries]
\n" + "
\n" + "
\n" + " \n" +@@ -307,7 +307,7 @@ static char xslmsg[] = + " \n" + "