From ab389647c8e37fca2b943b12dc2823d268ee6bd1 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Thu, 31 Oct 2013 16:51:24 +0100 Subject: [PATCH] Correct the upstream patch for #794940 Signed-off-by: Tomas Hozza --- bind.spec | 7 +- ...v2.patch => bind99-ISC-Bugs-34870-v3.patch | 76 +++++++++---------- 2 files changed, 41 insertions(+), 42 deletions(-) rename bind99-ISC-Bugs-34870-v2.patch => bind99-ISC-Bugs-34870-v3.patch (71%) diff --git a/bind.spec b/bind.spec index b189af4..90ddc67 100644 --- a/bind.spec +++ b/bind.spec @@ -26,7 +26,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: ISC Version: 9.9.4 -Release: 6%{?PATCHVER}%{?PREVER}%{?dist} +Release: 7%{?PATCHVER}%{?PREVER}%{?dist} Epoch: 32 Url: http://www.isc.org/products/BIND/ Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -83,7 +83,7 @@ Patch137:bind99-rrl.patch Patch138:bind-9.9.3-include-update-h.patch Patch139:bind99-ISC-Bugs-34738.patch # upstream patch [ISC-Bugs #34870] -Patch140:bind99-ISC-Bugs-34870-v2.patch +Patch140:bind99-ISC-Bugs-34870-v3.patch # SDB patches Patch11: bind-9.3.2b2-sdbsrc.patch @@ -795,6 +795,9 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Thu Oct 31 2013 Tomas Hozza 32:9.9.4-7 +- Correct the upstream patch for #794940 + * Thu Oct 31 2013 Tomas Hozza 32:9.9.4-6 - use --enable-filter-aaaa when building bind to enable use of filter-aaaa-on-v4 option diff --git a/bind99-ISC-Bugs-34870-v2.patch b/bind99-ISC-Bugs-34870-v3.patch similarity index 71% rename from bind99-ISC-Bugs-34870-v2.patch rename to bind99-ISC-Bugs-34870-v3.patch index 1e861bc..2869213 100644 --- a/bind99-ISC-Bugs-34870-v2.patch +++ b/bind99-ISC-Bugs-34870-v3.patch @@ -1,8 +1,7 @@ -diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c -index 2b7b970..491192d 100644 ---- a/bin/dig/dighost.c -+++ b/bin/dig/dighost.c -@@ -180,6 +180,7 @@ isc_boolean_t validated = ISC_TRUE; +diff -up bind-9.9.4/bin/dig/dighost.c.send_buffers bind-9.9.4/bin/dig/dighost.c +--- bind-9.9.4/bin/dig/dighost.c.send_buffers 2013-10-31 14:22:20.296811613 +0100 ++++ bind-9.9.4/bin/dig/dighost.c 2013-10-31 14:57:00.336400190 +0100 +@@ -194,6 +194,7 @@ isc_boolean_t validated = ISC_TRUE; isc_entropy_t *entp = NULL; isc_mempool_t *commctx = NULL; isc_boolean_t debugging = ISC_FALSE; @@ -10,7 +9,7 @@ index 2b7b970..491192d 100644 isc_boolean_t memdebugging = ISC_FALSE; char *progname = NULL; isc_mutex_t lookup_lock; -@@ -539,6 +540,12 @@ debug(const char *format, ...) { +@@ -553,6 +554,12 @@ debug(const char *format, ...) { if (debugging) { fflush(stdout); @@ -23,7 +22,7 @@ index 2b7b970..491192d 100644 va_start(args, format); vfprintf(stderr, format, args); va_end(args); -@@ -2365,8 +2372,10 @@ send_done(isc_task_t *_task, isc_event_t *event) { +@@ -2416,8 +2423,10 @@ send_done(isc_task_t *_task, isc_event_t for (b = ISC_LIST_HEAD(sevent->bufferlist); b != NULL; @@ -35,7 +34,7 @@ index 2b7b970..491192d 100644 query = event->ev_arg; query->waiting_senddone = ISC_FALSE; -@@ -2558,6 +2567,17 @@ send_tcp_connect(dig_query_t *query) { +@@ -2609,6 +2618,17 @@ send_tcp_connect(dig_query_t *query) { } } @@ -53,7 +52,7 @@ index 2b7b970..491192d 100644 /*% * Send a UDP packet to the remote nameserver, possible starting the * recv action as well. Also make sure that the timer is running and -@@ -2567,6 +2587,7 @@ static void +@@ -2618,6 +2638,7 @@ static void send_udp(dig_query_t *query) { dig_lookup_t *l = NULL; isc_result_t result; @@ -61,7 +60,7 @@ index 2b7b970..491192d 100644 debug("send_udp(%p)", query); -@@ -2613,14 +2634,16 @@ send_udp(dig_query_t *query) { +@@ -2664,14 +2685,16 @@ send_udp(dig_query_t *query) { debug("recvcount=%d", recvcount); } ISC_LIST_INIT(query->sendlist); @@ -82,7 +81,7 @@ index 2b7b970..491192d 100644 check_result(result, "isc_socket_sendtov"); sendcount++; } -@@ -2782,6 +2805,7 @@ static void +@@ -2838,6 +2861,7 @@ static void launch_next_query(dig_query_t *query, isc_boolean_t include_question) { isc_result_t result; dig_lookup_t *l; @@ -90,27 +89,28 @@ index 2b7b970..491192d 100644 INSIST(!free_now); -@@ -2805,9 +2829,13 @@ launch_next_query(dig_query_t *query, isc_boolean_t include_question) { +@@ -2861,9 +2885,15 @@ launch_next_query(dig_query_t *query, is isc_buffer_putuint16(&query->slbuf, (isc_uint16_t) query->sendbuf.used); ISC_LIST_INIT(query->sendlist); ISC_LINK_INIT(&query->slbuf, link); - ISC_LIST_ENQUEUE(query->sendlist, &query->slbuf, link); - if (include_question) - ISC_LIST_ENQUEUE(query->sendlist, &query->sendbuf, link); -+ buffer = clone_buffer(&query->slbuf); -+ ISC_LIST_ENQUEUE(query->sendlist, buffer, link); -+ if (include_question) { -+ buffer = clone_buffer(&query->sendbuf); ++ if (!query->first_soa_rcvd) { ++ buffer = clone_buffer(&query->slbuf); + ISC_LIST_ENQUEUE(query->sendlist, buffer, link); ++ if (include_question) { ++ buffer = clone_buffer(&query->sendbuf); ++ ISC_LIST_ENQUEUE(query->sendlist, buffer, link); ++ } + } + ISC_LINK_INIT(&query->lengthbuf, link); ISC_LIST_ENQUEUE(query->lengthlist, &query->lengthbuf, link); -diff --git a/bin/dig/host.c b/bin/dig/host.c -index 49fe991..3cb3ddf 100644 ---- a/bin/dig/host.c -+++ b/bin/dig/host.c +diff -up bind-9.9.4/bin/dig/host.c.send_buffers bind-9.9.4/bin/dig/host.c +--- bind-9.9.4/bin/dig/host.c.send_buffers 2013-10-31 14:22:20.270811568 +0100 ++++ bind-9.9.4/bin/dig/host.c 2013-10-31 14:22:20.328811669 +0100 @@ -638,6 +638,8 @@ pre_parse_args(int argc, char **argv) { case 'w': break; case 'C': break; @@ -120,10 +120,9 @@ index 49fe991..3cb3ddf 100644 debugging = ISC_TRUE; break; case 'N': break; -diff --git a/bin/dig/include/dig/dig.h b/bin/dig/include/dig/dig.h -index f04440c..41463d1 100644 ---- a/bin/dig/include/dig/dig.h -+++ b/bin/dig/include/dig/dig.h +diff -up bind-9.9.4/bin/dig/include/dig/dig.h.send_buffers bind-9.9.4/bin/dig/include/dig/dig.h +--- bind-9.9.4/bin/dig/include/dig/dig.h.send_buffers 2013-10-31 14:22:20.270811568 +0100 ++++ bind-9.9.4/bin/dig/include/dig/dig.h 2013-10-31 14:22:20.328811669 +0100 @@ -275,7 +275,7 @@ extern isc_boolean_t validated; extern isc_taskmgr_t *taskmgr; extern isc_task_t *global_task; @@ -133,10 +132,9 @@ index f04440c..41463d1 100644 extern char *progname; extern int tries; -diff --git a/lib/isc/include/isc/namespace.h b/lib/isc/include/isc/namespace.h -index f8744d8..e9bda5e 100644 ---- a/lib/isc/include/isc/namespace.h -+++ b/lib/isc/include/isc/namespace.h +diff -up bind-9.9.4/lib/isc/include/isc/namespace.h.send_buffers bind-9.9.4/lib/isc/include/isc/namespace.h +--- bind-9.9.4/lib/isc/include/isc/namespace.h.send_buffers 2013-09-05 07:09:08.000000000 +0200 ++++ bind-9.9.4/lib/isc/include/isc/namespace.h 2013-10-31 14:22:20.328811669 +0100 @@ -106,6 +106,7 @@ #define isc_socket_sendv isc__socket_sendv #define isc_socket_sendtov isc__socket_sendtov @@ -145,11 +143,10 @@ index f8744d8..e9bda5e 100644 #define isc_socket_cleanunix isc__socket_cleanunix #define isc_socket_permunix isc__socket_permunix #define isc_socket_bind isc__socket_bind -diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h -index 9d086b4..c5a753a 100644 ---- a/lib/isc/include/isc/socket.h -+++ b/lib/isc/include/isc/socket.h -@@ -866,6 +866,11 @@ isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, +diff -up bind-9.9.4/lib/isc/include/isc/socket.h.send_buffers bind-9.9.4/lib/isc/include/isc/socket.h +--- bind-9.9.4/lib/isc/include/isc/socket.h.send_buffers 2013-09-05 07:09:08.000000000 +0200 ++++ bind-9.9.4/lib/isc/include/isc/socket.h 2013-10-31 14:22:20.328811669 +0100 +@@ -866,6 +866,11 @@ isc_socket_sendtov(isc_socket_t *sock, i isc_task_t *task, isc_taskaction_t action, const void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t @@ -161,11 +158,10 @@ index 9d086b4..c5a753a 100644 isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, -diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c -index dc0b141..9b99acb 100644 ---- a/lib/isc/unix/socket.c -+++ b/lib/isc/unix/socket.c -@@ -505,6 +505,11 @@ isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, +diff -up bind-9.9.4/lib/isc/unix/socket.c.send_buffers bind-9.9.4/lib/isc/unix/socket.c +--- bind-9.9.4/lib/isc/unix/socket.c.send_buffers 2013-10-31 14:22:20.293811608 +0100 ++++ bind-9.9.4/lib/isc/unix/socket.c 2013-10-31 14:22:20.330811673 +0100 +@@ -510,6 +510,11 @@ isc__socket_sendtov(isc_socket_t *sock, isc_task_t *task, isc_taskaction_t action, const void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); ISC_SOCKETFUNC_SCOPE isc_result_t @@ -177,7 +173,7 @@ index dc0b141..9b99acb 100644 isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, -@@ -4791,15 +4796,25 @@ ISC_SOCKETFUNC_SCOPE isc_result_t +@@ -4796,15 +4801,25 @@ ISC_SOCKETFUNC_SCOPE isc_result_t isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_task_t *task, isc_taskaction_t action, const void *arg) { @@ -206,7 +202,7 @@ index dc0b141..9b99acb 100644 isc__socket_t *sock = (isc__socket_t *)sock0; isc_socketevent_t *dev; isc__socketmgr_t *manager; -@@ -4832,7 +4847,7 @@ isc__socket_sendtov(isc_socket_t *sock0, isc_bufferlist_t *buflist, +@@ -4837,7 +4852,7 @@ isc__socket_sendtov(isc_socket_t *sock0, buffer = ISC_LIST_HEAD(*buflist); }