From 1059bc2e42e8214f8b73d3b4cd181d8394a94a6a Mon Sep 17 00:00:00 2001
From: Francis Dupont
Date: Wed, 4 Feb 2015 14:22:32 +0100
Subject: [PATCH] added mdig tool
---
CHANGES | 4 ++++
bin/dig/dig.1 | 2 +-
bin/dig/dig.c | 2 +-
bin/dig/dig.docbook | 2 +-
bin/dig/dig.html | 2 +-
bin/tools/Makefile.in | 29 +++++++++++++++++++++--------
doc/arm/notes.xml | 8 ++++++++
lib/dns/dispatch.c | 4 +---
lib/dns/include/dns/dispatch.h | 2 --
win32utils/Configure | 4 ++++
win32utils/bind9.sln.in | 13 +++++++++++++
win32utils/legacy/BINDBuild.dsw.in | 21 +++++++++++++++++++++
win32utils/legacy/BuildAll.bat.in | 1 +
win32utils/legacy/BuildSetup.bat.in | 1 +
win32utils/readme1st.txt | 4 ++--
15 files changed, 80 insertions(+), 19 deletions(-)
diff --git a/CHANGES b/CHANGES
index 897347729f..89bbcc9bb8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+4054. [func] Added a new tool 'mdig', a light weight clone of
+ dig able to send multiple pipelined queries.
+ [RT #38261]
+
4053. [security] Revoking a managed trust anchor and supplying
an untrusted replacement could cause named
to crash with an assertion failure.
diff --git a/bin/dig/dig.1 b/bin/dig/dig.1
index db6961e624..de71c945f9 100644
--- a/bin/dig/dig.1
+++ b/bin/dig/dig.1
@@ -550,7 +550,7 @@ ixfr=N
query is requested, in which case the default is TCP. AXFR queries always use TCP.
.RE
.PP
-\fB+time=T\fR
+\fB+timeout=T\fR
.RS 4
Sets the timeout for a query to
\fIT\fR
diff --git a/bin/dig/dig.c b/bin/dig/dig.c
index 4517c0dd5c..08ce45d751 100644
--- a/bin/dig/dig.c
+++ b/bin/dig/dig.c
@@ -184,7 +184,7 @@ help(void) {
" d-opt is of the form +keyword[=value], where keyword is:\n"
" +[no]vc (TCP mode)\n"
" +[no]tcp (TCP mode, alternate syntax)\n"
-" +time=### (Set query timeout) [5]\n"
+" +timeout=### (Set query timeout) [5]\n"
" +tries=### (Set number of UDP attempts) [3]\n"
" +retry=### (Set number of UDP retries) [2]\n"
" +domain=### (Set default domainname)\n"
diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook
index d62b35cb4b..6ee137e7bb 100644
--- a/bin/dig/dig.docbook
+++ b/bin/dig/dig.docbook
@@ -917,7 +917,7 @@
-
+
diff --git a/bin/dig/dig.html b/bin/dig/dig.html
index a60db4dcb3..031fbce577 100644
--- a/bin/dig/dig.html
+++ b/bin/dig/dig.html
@@ -584,7 +584,7 @@
case the default is TCP. AXFR queries always use
TCP.
-
Sets the timeout for a query to
diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in
index 253dd37477..cf3c31644a 100644
--- a/bin/tools/Makefile.in
+++ b/bin/tools/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010, 2012-2014 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2010, 2012-2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -12,27 +12,31 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.13 2010/01/07 23:48:53 tbox Exp $
+# $Id$
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
+@BIND9_VERSION@
+
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
- ${LWRES_INCLUDES} ${OMAPI_INCLUDES}
+ ${LWRES_INCLUDES} ${OMAPI_INCLUDES} ${BIND9_INCLUDES}
-CDEFINES =
+CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
+BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
+BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
@@ -44,14 +48,15 @@ SUBDIRS =
TARGETS = arpaname@EXEEXT@ named-journalprint@EXEEXT@ \
named-rrchecker@EXEEXT@ nsec3hash@EXEEXT@ \
- genrandom@EXEEXT@ isc-hmac-fixup@EXEEXT@
+ genrandom@EXEEXT@ isc-hmac-fixup@EXEEXT@ mdig@EXEEXT@
SRCS = arpaname.c named-journalprint.c named-rrchecker.c \
- nsec3hash.c genrandom.c isc-hmac-fixup.c
+ nsec3hash.c genrandom.c isc-hmac-fixup.c mdig.c
MANPAGES = arpaname.1 named-journalprint.8 named-rrchecker.1 nsec3hash.8 \
- genrandom.8 isc-hmac-fixup.8
+ genrandom.8 isc-hmac-fixup.8 mdig.1
HTMLPAGES = arpaname.html named-journalprint.html named-rrchecker.html \
- nsec3hash.html genrandom.html isc-hmac-fixup.html
+ nsec3hash.html genrandom.html isc-hmac-fixup.html \
+ mdig.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
@@ -84,6 +89,11 @@ genrandom@EXEEXT@: genrandom.@O@
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
-o $@ genrandom.@O@ @GENRANDOMLIB@ ${LIBS}
+mdig@EXEEXT@: mdig.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS}
+ export BASEOBJS="mdig.@O@"; \
+ export LIBS0="${DNSLIBS} ${BIND9LIBS}"; \
+ ${FINALBUILDCMD}
+
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
@@ -107,12 +117,15 @@ install:: ${TARGETS} installdirs
${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} isc-hmac-fixup@EXEEXT@ \
${DESTDIR}${sbindir}
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} mdig@EXEEXT@ \
+ ${DESTDIR}${sbindir}
${INSTALL_DATA} ${srcdir}/arpaname.1 ${DESTDIR}${mandir}/man1
${INSTALL_DATA} ${srcdir}/isc-hmac-fixup.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/named-journalprint.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/named-rrchecker.1 ${DESTDIR}${mandir}/man1
${INSTALL_DATA} ${srcdir}/nsec3hash.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/genrandom.8 ${DESTDIR}${mandir}/man8
+ ${INSTALL_DATA} ${srcdir}/mdig.1 ${DESTDIR}${mandir}/man1
clean distclean::
rm -f ${TARGETS}
diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml
index 00853e4b78..c6f7447c42 100644
--- a/doc/arm/notes.xml
+++ b/doc/arm/notes.xml
@@ -310,6 +310,14 @@
behavior for all clients, use "keep-response-order { any; };".
+
+
+ The new mdig command is a version of
+ dig that sends multiple pipelined
+ queries and then waits for responses, instead of sending one
+ query and waiting the response before sending the next. [RT #38261]
+
+
diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
index b30a33f5b5..65806683f0 100644
--- a/lib/dns/dispatch.c
+++ b/lib/dns/dispatch.c
@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.c,v 1.175 2011/11/29 01:03:47 marka Exp $ */
-
/*! \file */
#include
@@ -2694,7 +2692,7 @@ dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
REQUIRE(dispp != NULL && *dispp == NULL);
REQUIRE(connected != NULL);
- /* First pass (same than dns_dispatch_gettcp()) */
+ /* First pass (same as dns_dispatch_gettcp()) */
attributes = DNS_DISPATCHATTR_TCP | DNS_DISPATCHATTR_CONNECTED;
mask = DNS_DISPATCHATTR_TCP | DNS_DISPATCHATTR_PRIVATE |
DNS_DISPATCHATTR_EXCLUSIVE | DNS_DISPATCHATTR_CONNECTED;
diff --git a/lib/dns/include/dns/dispatch.h b/lib/dns/include/dns/dispatch.h
index 79ee3aab1a..d5cffa634c 100644
--- a/lib/dns/include/dns/dispatch.h
+++ b/lib/dns/include/dns/dispatch.h
@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.h,v 1.64 2011/07/28 23:47:58 tbox Exp $ */
-
#ifndef DNS_DISPATCH_H
#define DNS_DISPATCH_H 1
diff --git a/win32utils/Configure b/win32utils/Configure
index 5fcd6732e5..e491e60d23 100644
--- a/win32utils/Configure
+++ b/win32utils/Configure
@@ -91,6 +91,8 @@ my @filelist = ("..\\bin\\check\\win32\\checktool.dsp",
"..\\bin\\tools\\win32\\ischmacfixup.mak",
"..\\bin\\tools\\win32\\journalprint.dsp",
"..\\bin\\tools\\win32\\journalprint.mak",
+ "..\\bin\\tools\\win32\\mdig.dsp",
+ "..\\bin\\tools\\win32\\mdig.mak",
"..\\bin\\tools\\win32\\nsec3hash.dsp",
"..\\bin\\tools\\win32\\nsec3hash.mak",
"..\\bin\\tools\\win32\\rrchecker.dsp",
@@ -250,6 +252,8 @@ my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj",
"..\\bin\\tools\\win32\\ischmacfixup.vcxproj.filters",
"..\\bin\\tools\\win32\\journalprint.vcxproj",
"..\\bin\\tools\\win32\\journalprint.vcxproj.filters",
+ "..\\bin\\tools\\win32\\mdig.vcxproj",
+ "..\\bin\\tools\\win32\\mdig.vcxproj.filters",
"..\\bin\\tools\\win32\\nsec3hash.vcxproj",
"..\\bin\\tools\\win32\\nsec3hash.vcxproj.filters",
"..\\bin\\tools\\win32\\rrchecker.vcxproj",
diff --git a/win32utils/bind9.sln.in b/win32utils/bind9.sln.in
index c6145739a8..b0693500d6 100644
--- a/win32utils/bind9.sln.in
+++ b/win32utils/bind9.sln.in
@@ -47,6 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BINDInstall", "..\bin\win32
{B4AC7F81-E3DC-43E9-B339-4FA5149FA8F7} = {B4AC7F81-E3DC-43E9-B339-4FA5149FA8F7}
{70F2F0DF-665D-4444-A982-AEA31A861A22} = {70F2F0DF-665D-4444-A982-AEA31A861A22}
{98743A7C-6AF8-467f-9911-FA69C451AF2B} = {98743A7C-6AF8-467f-9911-FA69C451AF2B}
+ {3115091C-8135-481F-9757-F013A26255E0} = {3115091C-8135-481F-9757-F013A26255E0}
{C41266C7-E27E-4D60-9815-82D3B32BF82F} = {C41266C7-E27E-4D60-9815-82D3B32BF82F}
{2C1F7096-C5B5-48D4-846F-A7ACA454335D} = {2C1F7096-C5B5-48D4-846F-A7ACA454335D}
{03A96113-CB14-43AA-AEB2-48950E3915C5} = {03A96113-CB14-43AA-AEB2-48950E3915C5}
@@ -395,6 +396,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrchecker", "..\bin\tools\w
{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} = {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdig", "..\bin\tools\win32\mdig.vcxproj", "{3115091C-8135-481F-9757-F013A26255E0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} = {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}
+ {3840E563-D180-4761-AA9C-E6155F02EAFF} = {3840E563-D180-4761-AA9C-E6155F02EAFF}
+ {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} = {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}
+ {E741C10B-B075-4206-9596-46765B665E03} = {E741C10B-B075-4206-9596-46765B665E03}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsupdate", "..\bin\nsupdate\win32\nsupdate.vcxproj", "{C41266C7-E27E-4D60-9815-82D3B32BF82F}"
ProjectSection(ProjectDependencies) = postProject
{A3F71D12-F38A-4C77-8D87-8E8854CA74A1} = {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}
@@ -792,6 +801,10 @@ Global
{98743A7C-6AF8-467f-9911-FA69C451AF2B}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@
{98743A7C-6AF8-467f-9911-FA69C451AF2B}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@
{98743A7C-6AF8-467f-9911-FA69C451AF2B}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@
+ {3115091C-8135-481F-9757-F013A26255E0}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@
+ {3115091C-8135-481F-9757-F013A26255E0}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@
+ {3115091C-8135-481F-9757-F013A26255E0}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@
+ {3115091C-8135-481F-9757-F013A26255E0}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@
{C41266C7-E27E-4D60-9815-82D3B32BF82F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@
{C41266C7-E27E-4D60-9815-82D3B32BF82F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@
{C41266C7-E27E-4D60-9815-82D3B32BF82F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@
diff --git a/win32utils/legacy/BINDBuild.dsw.in b/win32utils/legacy/BINDBuild.dsw.in
index 7ef7fdd453..e9d5a6ab1c 100644
--- a/win32utils/legacy/BINDBuild.dsw.in
+++ b/win32utils/legacy/BINDBuild.dsw.in
@@ -721,6 +721,27 @@ Package=<4>
###############################################################################
+Project: "mdig"="..\..\bin\tools\win32\mdig.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libisc
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libdns
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libbind9
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "nsec3hash"="..\..\bin\tools\win32\nsec3hash.dsp" - Package Owner=<4>
Package=<5>
diff --git a/win32utils/legacy/BuildAll.bat.in b/win32utils/legacy/BuildAll.bat.in
index c559c7f19e..9e4cc3a321 100644
--- a/win32utils/legacy/BuildAll.bat.in
+++ b/win32utils/legacy/BuildAll.bat.in
@@ -156,6 +156,7 @@ nmake /nologo -f nsec3hash.mak CFG="nsec3hash - @PLATFORM@ Release" NO_EXTERNAL
nmake /nologo -f journalprint.mak CFG="journalprint - @PLATFORM@ Release" NO_EXTERNAL_DEPS="1"
nmake /nologo -f ischmacfixup.mak CFG="ischmacfixup - @PLATFORM@ Release" NO_EXTERNAL_DEPS="1"
nmake /nologo -f rrchecker.mak CFG="rrchecker - @PLATFORM@ Release" NO_EXTERNAL_DEPS="1"
+nmake /nologo -f mdig.mak CFG="mdig - @PLATFORM@ Release" NO_EXTERNAL_DEPS="1"
cd ..\..
@IF TESTS
diff --git a/win32utils/legacy/BuildSetup.bat.in b/win32utils/legacy/BuildSetup.bat.in
index 6ad68f7ab6..7529dfc28b 100644
--- a/win32utils/legacy/BuildSetup.bat.in
+++ b/win32utils/legacy/BuildSetup.bat.in
@@ -81,6 +81,7 @@ copy ..\..\bin\pkcs11\pkcs11-tokens.html ..\..\Build\Release
copy ..\..\bin\tools\arpaname.html ..\..\Build\Release
copy ..\..\bin\tools\genrandom.html ..\..\Build\Release
copy ..\..\bin\tools\isc-hmac-fixup.html ..\..\Build\Release
+copy ..\..\bin\tools\mdig.html ..\..\Build\Release
copy ..\..\bin\tools\named-journalprint.html ..\..\Build\Release
copy ..\..\bin\tools\named-rrchecker.html ..\..\Build\Release
copy ..\..\bin\tools\nsec3hash.html ..\..\Build\Release
diff --git a/win32utils/readme1st.txt b/win32utils/readme1st.txt
index 89ba436827..58809b6ee5 100644
--- a/win32utils/readme1st.txt
+++ b/win32utils/readme1st.txt
@@ -120,8 +120,8 @@ are HTML pages for each of the BIND 9 applications.
INCLUDED TOOLS:
The following tools have been built for Windows: dig, nslookup,
-host, nsupdate, ddns-confgen, rndc, rndc-confgen, named-checkconf,
-named-checkzone, named-compilezone, named-journalprint,
+host, nsupdate, ddns-confgen, rndc, rndc-confgen, delv, mdig,
+named-checkconf, named-checkzone, named-compilezone, named-journalprint,
named-rrchecker, dnssec-importkey, dnssec-keygen, dnssec-signzone,
dnssec-dsfromkey, dnssec-keyfromlabel, dnssec-revoke, dnssec-settime
and dnssec-verify. The latter tools are for use with DNSSEC. All tools