summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianfranco Costamagna <locutusofborg@debian.org>2019-08-27 07:17:45 +0100
committerGianfranco Costamagna <locutusofborg@debian.org>2019-08-27 07:17:45 +0100
commitca850b9ead53d6590af223ebed79d93d4fd7fe19 (patch)
treeb93dbbb298539392b6dc56d0bfcb5cde718d9b7a
parent4632df3c8308413cae8f39c12adcdd62eb1dfcb0 (diff)
parent890895b0dbc3371d406fca434f58afa8b2368702 (diff)
Record adns (1.5.1-0.1) in archive suite sid
-rw-r--r--.gitignore12
-rw-r--r--INSTALL2
-rw-r--r--Makefile.in4
-rw-r--r--NEWS6
-rw-r--r--README10
-rw-r--r--README.html4
-rwxr-xr-xRELEASE-CHECKLIST13
-rw-r--r--acconfig.h2
-rw-r--r--aclocal.m42
-rw-r--r--changelog27
-rw-r--r--client/Makefile.in2
-rw-r--r--client/addrtext.c2
-rw-r--r--client/adh-main.c2
-rw-r--r--client/adh-opts.c2
-rw-r--r--client/adh-query.c2
-rw-r--r--client/adnsheloex.c2
-rw-r--r--client/adnshost.h2
-rw-r--r--client/adnslogres.c2
-rw-r--r--client/adnsresfilter.c4
-rw-r--r--client/adnstest.c5
-rw-r--r--client/client.h6
-rw-r--r--client/fanftest.c2
-rw-r--r--common.make.in2
-rw-r--r--configure.in2
-rw-r--r--debian/adns-tools.manpages1
-rw-r--r--debian/changelog11
-rw-r--r--debian/control2
-rw-r--r--debian/copyright2
-rwxr-xr-xdebian/rules6
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
-rw-r--r--dynamic/Makefile.in2
-rw-r--r--regress/Makefile.in2
-rwxr-xr-xregress/addcases2
-rw-r--r--regress/case-1stservbroken.sys10
-rw-r--r--regress/case-1stservtotcp.sys5
-rw-r--r--regress/case-2ndservtcp.sys10
-rw-r--r--regress/case-adh-cancel.sys1
-rw-r--r--regress/case-adh-cancel2.sys1
-rw-r--r--regress/case-adh-cancel3.sys1
-rw-r--r--regress/case-adh-norm.sys1
-rw-r--r--regress/case-adh-pipe.sys1
-rw-r--r--regress/case-arf-norm.sys1
-rw-r--r--regress/case-arf-text.sys1
-rw-r--r--regress/case-dh-ptr-aaaa.sys1
-rw-r--r--regress/case-huasenchem.err1
-rwxr-xr-xregress/case-huasenchem.in16
-rw-r--r--regress/case-huasenchem.out13
-rw-r--r--regress/case-huasenchem.sys402
-rw-r--r--regress/case-manyptrwrong.sys5
-rw-r--r--regress/case-manyptrwrongrem.sys5
-rw-r--r--regress/case-manyptrwrongrst.sys5
-rw-r--r--regress/case-manyptrwrongrty.sys5
-rw-r--r--regress/case-norecurse.sys5
-rw-r--r--regress/case-norecurse2.sys5
-rw-r--r--regress/case-srvbaddom.out2
-rw-r--r--regress/case-srvbaddom.sys1
-rw-r--r--regress/case-srvha.sys1
-rw-r--r--regress/case-srvok.sys1
-rw-r--r--regress/case-srvqudom.out2
-rw-r--r--regress/case-srvqudom.sys1
-rw-r--r--regress/case-srvsort.sys1
-rw-r--r--regress/case-tcpallfail.sys10
-rw-r--r--regress/case-tcpautosys.err0
-rw-r--r--regress/case-tcpautosys.out6
-rw-r--r--regress/case-tcpautosys.sys69
-rw-r--r--regress/case-tcpautosysmissingserv.err0
-rw-r--r--regress/case-tcpautosysmissingserv.out6
-rw-r--r--regress/case-tcpautosysmissingserv.sys75
-rw-r--r--regress/case-tcpblock.sys5
-rw-r--r--regress/case-tcpblockbrk.sys10
-rw-r--r--regress/case-tcpblockwr.sys5
-rw-r--r--regress/case-tcpbreakin.sys10
-rw-r--r--regress/case-tcpmultipart.sys5
-rw-r--r--regress/case-tcpptr.sys5
-rw-r--r--regress/case-unknown2.sys1
-rw-r--r--regress/case-unknown33.sys1
-rw-r--r--regress/case-unknown5.sys1
-rwxr-xr-xregress/checkall2
-rw-r--r--regress/harness.h2
-rw-r--r--regress/harness.h.m46
-rw-r--r--regress/hcommon.c14
-rw-r--r--regress/hcommon.c.m418
-rw-r--r--regress/hmacros.i42
-rw-r--r--regress/hplayback.c4
-rw-r--r--regress/hplayback.c.m47
-rw-r--r--regress/hrecord.c.m42
-rw-r--r--regress/hredirect.h.m42
-rw-r--r--regress/hsyscalls.h.m42
-rw-r--r--regress/hsyscalls.i42
-rw-r--r--regress/init-missingserver.text1
-rwxr-xr-xregress/m1test2
-rwxr-xr-xregress/r1test2
-rwxr-xr-xregress/sys-rc-convert7
-rw-r--r--settings.make.in2
-rw-r--r--src/Makefile.in2
-rw-r--r--src/addrfam.c2
-rw-r--r--src/adns.make2
-rw-r--r--src/check.c2
-rw-r--r--src/dlist.h2
-rw-r--r--src/event.c21
-rw-r--r--src/general.c2
-rw-r--r--src/internal.h2
-rw-r--r--src/parse.c2
-rw-r--r--src/poll.c2
-rw-r--r--src/query.c2
-rw-r--r--src/reply.c2
-rw-r--r--src/setup.c12
-rw-r--r--src/transmit.c2
-rw-r--r--src/tvarith.h2
-rw-r--r--src/types.c3
111 files changed, 892 insertions, 110 deletions
diff --git a/.gitignore b/.gitignore
index ff349e4..973a480 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,15 +38,3 @@ regress/pipe.err
src/Makefile
src/config.h
web
-
-build-stamp
-debian/*.debhelper.log
-debian/tmp
-debian/adns-tools
-debian/libadns1
-debian/libadns1-dev
-debian/libadns1-dbg
-debian/*.postinst.debhelper
-debian/*.postrm.debhelper
-debian/files
-debian/*.substvars
diff --git a/INSTALL b/INSTALL
index a0a2196..c4bdbf9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -101,7 +101,7 @@ details for adns. It is
Copyright (C) 1997-2000 Ian Jackson <ijackson@chiark.greenend.org.uk>
adns is
- Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
Copyright (C) 2014 Mark Wooding
Copyright (C) 1999-2000,2003,2006 Tony Finch <dot@dotat.at> [1]
Copyright (C) 1991 Massachusetts Institute of Technology [2]
diff --git a/Makefile.in b/Makefile.in
index 68146ba..5c29ccb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
# Makefile[.in] - top-level Makefile
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
@@ -24,7 +24,7 @@ include ./common.make
# Remember to change ADNS_VERSION_STRING in client/client.h too, and
# possibly library soname (MAJOR and MINOR in common.make.in).
-DISTVERSION= 1.5.0~rc1
+DISTVERSION= 1.5.1
srcdir= @srcdir@
VPATH= @srcdir@
diff --git a/NEWS b/NEWS
index 541cc02..4cb9630 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes in adns 1.5.1, since adns 1.5.0, are:
+
+ Bugfixes. See changelog.
+
Changes in adns 1.5.0, since adns 1.4, are:
New features:
@@ -35,7 +39,7 @@ Changes in adns 1.5.0, since adns 1.4, are:
* There are also some build system, test suite and coding style
improvements.
- * Licence is now GPLv3.
+ * Licence is now GPLv3+.
Compatibility:
diff --git a/README b/README
index b5ba96d..c045cae 100644
--- a/README
+++ b/README
@@ -120,9 +120,9 @@ References and related projects
Copyright and licensing
- adns is Copyright 1997-2000,2003,2006,2014 Ian Jackson, Copyright 2014
- Mark Wooding, Copyright 1999-2000,2003,2006 Tony Finch, and Copyright
- (C) 1991 Massachusetts Institute of Technology.
+ adns is Copyright 1997-2000,2003,2006,2014-2016 Ian Jackson, Copyright
+ 2014 Mark Wooding, Copyright 1999-2000,2003,2006 Tony Finch, and
+ Copyright (C) 1991 Massachusetts Institute of Technology.
adns is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@ -143,7 +143,7 @@ Copyright and licensing
[17]GNU home page; [18]chiark home page; [19]site or mirror home page
- This web page is Copyright (C)1996-2005,2014 Ian Jackson. See the
+ This web page is Copyright (C)1996-2005,2014-2016 Ian Jackson. See the
[20]Copyright/acknowledgements.
References
@@ -166,5 +166,5 @@ References
16. http://www.fsf.org/
17. http://www.gnu.org/
18. http://www.chiark.greenend.org.uk/
- 19. file://localhost/
+ 19. file:///
20. http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html
diff --git a/README.html b/README.html
index 3d7c06e..07123cd 100644
--- a/README.html
+++ b/README.html
@@ -187,7 +187,7 @@ replies to adns's queries.
<h2>Copyright and licensing</h2>
-<kbd>adns</kbd> is Copyright 1997-2000,2003,2006,2014 Ian Jackson,
+<kbd>adns</kbd> is Copyright 1997-2000,2003,2006,2014-2016 Ian Jackson,
Copyright 2014 Mark Wooding, Copyright 1999-2000,2003,2006 Tony Finch,
and Copyright (C) 1991 Massachusetts Institute of Technology.
@@ -225,7 +225,7 @@ Ian Jackson / <tt>ijackson@chiark.greenend.org.uk</tt>.
<A href="/">site or mirror home page</A>
<p>
-This web page is Copyright (C)1996-2005,2014 Ian Jackson. See the
+This web page is Copyright (C)1996-2005,2014-2016 Ian Jackson. See the
<A href="http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html">Copyright/acknowledgements</A>.
</body>
diff --git a/RELEASE-CHECKLIST b/RELEASE-CHECKLIST
index d2fb527..cdd3461 100755
--- a/RELEASE-CHECKLIST
+++ b/RELEASE-CHECKLIST
@@ -4,15 +4,22 @@
# * Maybe rerun autoconf
# * Ensure changelog reflects changes
# * Ensure NEWS reflects changes
+# * Maybe update copyright dates
# * Maybe update MAJOR and/or MINOR in common.make.in
# * Update DISTVERSION in Makefile.in
# * Update ADNS_VERSION_STRING in client/client.h
+# * Update version in ./changelog
+# * Commit the result
#
# * Run this script
# ./RELEASE-CHECKLIST [--real] <version>
#
# * On chiark, maybe, replace ~ian/public-html/adns/current
-# with symlink to web-$(version) (as directed by script)
+# with symlink to web-$(version)
+#
+# * On chiark, maybe, replace docs link (as directed by script)
+#
+# * If not an rc release, put files on ftp.gnu.org
#
# * Send release announcement (use last one as template)
#
@@ -45,8 +52,8 @@ wx () { if $real; then x "$@"; else echo "WOULD: $*"; fi; }
x git clean -xdff
x ./configure
-x make -j4
-x make check
+x make -j6
+x make check -j6
x make dist
rm -rf web
x make web-install
diff --git a/acconfig.h b/acconfig.h
index af61b7d..c3ed43d 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/aclocal.m4 b/aclocal.m4
index 12b3b56..4a4d074 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
# aclocal.m4 - package-specific macros for autoconf
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/changelog b/changelog
index 3a6f1be..dcc43b8 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,30 @@
+adns (1.5.1) UPSTREAM; urgency=medium
+
+ * Portability fix for systems where socklen_t is bigger than int.
+ * Fix for malicious optimisation of memcpy in test suite, which
+ causes failure with gcc-4.1.9 -O3. See Debian bug #772718.
+ * Fix TCP async connect handling. The bug is hidden on Linux and on most
+ systems where the nameserver is on localhost. If it is not hidden,
+ adns's TCP support is broken unless adns_if_noautosys is used.
+ * Fix addr queries (including subqueries, ie including deferencing MX
+ lookups etc.) not to crash when one of the address queries returns
+ tempfail. Also, do not return a spurious pointer to the application
+ when one of the address queries returns a permanent error (although,
+ the application almost certainly won't use this pointer because the
+ associated count is zero).
+ * adnsresfilter: Fix addrtextbuf buffer size. This is not actually a
+ problem in real compiled code but should be corrected.
+ * Properly include harness.h in adnstest.c in regress/. Suppresses
+ a couple of compiler warnings (implicit declaration of Texit, etc.)
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk> Fri, 12 Aug 2016 22:53:59 +0100
+
+adns (1.5.0) UPSTREAM; urgency=low
+
+ * Release 1.5.0. No changes since 1.5.0~rc1.
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk> Sun, 26 Oct 2014 14:57:10 +0000
+
adns (1.5.0~rc1) UPSTREAM; urgency=low
ABI/API changes:
diff --git a/client/Makefile.in b/client/Makefile.in
index e97259c..fa3a002 100644
--- a/client/Makefile.in
+++ b/client/Makefile.in
@@ -1,7 +1,7 @@
# client/Makefile - client program(s) Makefile
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/addrtext.c b/client/addrtext.c
index 7cc7111..212dece 100644
--- a/client/addrtext.c
+++ b/client/addrtext.c
@@ -22,7 +22,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adh-main.c b/client/adh-main.c
index c77aa5d..9709be2 100644
--- a/client/adh-main.c
+++ b/client/adh-main.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adh-opts.c b/client/adh-opts.c
index 04664eb..2f1f183 100644
--- a/client/adh-opts.c
+++ b/client/adh-opts.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adh-query.c b/client/adh-query.c
index 55b23e7..03f97b1 100644
--- a/client/adh-query.c
+++ b/client/adh-query.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adnsheloex.c b/client/adnsheloex.c
index 848de21..5c0befe 100644
--- a/client/adnsheloex.c
+++ b/client/adnsheloex.c
@@ -7,7 +7,7 @@
* Copyright (C) 2004 Tony Finch <dot@dotat.at>
*
* It is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adnshost.h b/client/adnshost.h
index 0a7a758..e68ecb7 100644
--- a/client/adnshost.h
+++ b/client/adnshost.h
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adnslogres.c b/client/adnslogres.c
index 1a99694..4ab81ee 100644
--- a/client/adnslogres.c
+++ b/client/adnslogres.c
@@ -8,7 +8,7 @@
* Copyright (C) 1999-2000 Ian Jackson <ian@davenant.greenend.org.uk>
*
* It is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/client/adnsresfilter.c b/client/adnsresfilter.c
index 770af17..f3244b9 100644
--- a/client/adnsresfilter.c
+++ b/client/adnsresfilter.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -67,7 +67,7 @@ static int peroutqueuenode, outqueuelen;
static struct sockaddr_in sa;
static adns_state ads;
-static char addrtextbuf[14];
+static char addrtextbuf[18]; /* [ddd.ddd.ddd.ddd] + nul */
static int cbyte, inbyte, inbuf;
static unsigned char bytes[4];
static struct timeval printbefore;
diff --git a/client/adnstest.c b/client/adnstest.c
index 59a3bbc..faba1bc 100644
--- a/client/adnstest.c
+++ b/client/adnstest.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -38,6 +38,9 @@
#ifdef ADNS_REGRESS_TEST
# include "hredirect.h"
+# include "harness.h"
+# undef exit
+# define exit Texit
#endif
struct myctx {
diff --git a/client/client.h b/client/client.h
index 5d2f475..b318768 100644
--- a/client/client.h
+++ b/client/client.h
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -27,10 +27,10 @@
#ifndef CLIENT_H_INCLUDED
#define CLIENT_H_INCLUDED
-#define ADNS_VERSION_STRING "1.5.0~rc1"
+#define ADNS_VERSION_STRING "1.5.1"
#define COPYRIGHT_MESSAGE \
- "Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson\n" \
+ "Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson\n" \
"Copyright (C) 2014 Mark Wooding\n" \
"Copyright (C) 1999-2000,2003,2006 Tony Finch\n" \
"Copyright (C) 1991 Massachusetts Institute of Technology\n" \
diff --git a/client/fanftest.c b/client/fanftest.c
index 3caa882..6d6964b 100644
--- a/client/fanftest.c
+++ b/client/fanftest.c
@@ -8,7 +8,7 @@
* Copyright (C) 1999-2000 Ian Jackson <ian@davenant.greenend.org.uk>
*
* It is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/common.make.in b/common.make.in
index 0f6df15..baced41 100644
--- a/common.make.in
+++ b/common.make.in
@@ -2,7 +2,7 @@
# used by autoconf/configure to generate settings.make
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/configure.in b/configure.in
index 2221d08..712572e 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
# configure.in - input to autoconf
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/debian/adns-tools.manpages b/debian/adns-tools.manpages
new file mode 100644
index 0000000..0f65186
--- /dev/null
+++ b/debian/adns-tools.manpages
@@ -0,0 +1 @@
+debian/*.1
diff --git a/debian/changelog b/debian/changelog
index 48ae662..8a31241 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+adns (1.5.1-0.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ - (Previous upload Closes: #694763)
+ * New upstream release (Closes: #772718)
+ * Add watch file (Closes: #852877)
+ * Convert to quilt package
+ * Automatically create manpage during build (Closes: #85854)
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org> Tue, 27 Aug 2019 08:17:45 +0200
+
adns (1.5.0~rc1-1.2) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 0714b7a..08f1f54 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: adns
Section: devel
Priority: optional
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
-Build-Depends: debhelper (>= 7), netbase, m4, lynx
+Build-Depends: debhelper (>= 7), netbase, m4, lynx, help2man
Standards-Version: 3.8.0
Homepage: http://www.chiark.greenend.org.uk/~ian/adns/
diff --git a/debian/copyright b/debian/copyright
index 4d6416c..82143d8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,7 +7,7 @@ Upstream Author: Ian Jackson / ijackson@chiark.greenend.org.uk
Copyright:
- adns is Copyright 1997-2000,2003,2006,2014 Ian Jackson, Copyright 2014
+ adns is Copyright 1997-2000,2003,2006,2016 Ian Jackson, Copyright 2014
Mark Wooding, Copyright 1999-2000,2003,2006 Tony Finch, and Copyright
(C) 1991 Massachusetts Institute of Technology.
diff --git a/debian/rules b/debian/rules
index da7cbbb..486be6f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,12 @@ export XLDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
override_dh_auto_clean:
-$(MAKE) distclean
rm -f regress/output-*
+ rm -f debian/*.1
+override_dh_auto_build:
+ dh_auto_build
override_dh_auto_install:
$(MAKE) install prefix=`pwd`/debian/tmp/usr
+ for i in `ls debian/tmp/usr/bin/`; do \
+ LD_LIBRARY_PATH=debian/tmp/usr/lib/ help2man -N -n "Asynchronous-capable DNS client utilities" debian/tmp/usr/bin/$$i > debian/$$i.1; \
+ done
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d28d8c5
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+https://www.chiark.greenend.org.uk/~ian/adns/ftp/ adns-?(\d\S*)\.tar\.gz
diff --git a/dynamic/Makefile.in b/dynamic/Makefile.in
index 61c8289..0784e6a 100644
--- a/dynamic/Makefile.in
+++ b/dynamic/Makefile.in
@@ -1,7 +1,7 @@
# dynamic/Makefile - dynamic library Makefile
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/Makefile.in b/regress/Makefile.in
index b0035e7..21e7156 100644
--- a/regress/Makefile.in
+++ b/regress/Makefile.in
@@ -1,7 +1,7 @@
# regress/Makefile[.in] - regression test Makefile
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/addcases b/regress/addcases
index 064a2a7..3da3aa3 100755
--- a/regress/addcases
+++ b/regress/addcases
@@ -2,7 +2,7 @@
# usage: ./addcases <casename> ...
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/case-1stservbroken.sys b/regress/case-1stservbroken.sys
index fe4363c..479ccb2 100644
--- a/regress/case-1stservbroken.sys
+++ b/regress/case-1stservbroken.sys
@@ -68,10 +68,13 @@ adnstest 1stservbroken
select max=6 rfds=[4] wfds=[5] efds=[] to=13.987562
select=1 rfds=[] wfds=[5] efds=[]
+0.001172
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=OK
.
- +0.001161
+ +0.001160
write fd=5
003b311f 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265
6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01.
@@ -104,9 +107,12 @@ adnstest 1stservbroken
select max=6 rfds=[4] wfds=[5] efds=[] to=13.992868
select=1 rfds=[] wfds=[5] efds=[]
+0.001011
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000595
+ +0.000594
write fd=5
003b311f 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265
6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01.
diff --git a/regress/case-1stservtotcp.sys b/regress/case-1stservtotcp.sys
index e6ef382..87da98b 100644
--- a/regress/case-1stservtotcp.sys
+++ b/regress/case-1stservtotcp.sys
@@ -80,9 +80,12 @@ adnstest 1stservto
select max=6 rfds=[4] wfds=[5] efds=[] to=13.991978
select=1 rfds=[] wfds=[5] efds=[]
+0.001038
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.001203
+ +0.001202
write fd=5
003b311f 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265
6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01.
diff --git a/regress/case-2ndservtcp.sys b/regress/case-2ndservtcp.sys
index fa9e994..b3502c7 100644
--- a/regress/case-2ndservtcp.sys
+++ b/regress/case-2ndservtcp.sys
@@ -65,9 +65,12 @@ adnstest 2ndserver
select max=6 rfds=[4] wfds=[5] efds=[] to=13.996770
select=1 rfds=[] wfds=[5] efds=[]
+1.-14443
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EHOSTUNREACH
- +0.000193
+ +0.000192
close fd=5
close=OK
+0.000146
@@ -89,9 +92,12 @@ adnstest 2ndserver
select max=6 rfds=[4] wfds=[5] efds=[] to=13.998787
select=1 rfds=[] wfds=[5] efds=[]
+0.000135
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000062
+ +0.000061
write fd=5
003b311f 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265
6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01.
diff --git a/regress/case-adh-cancel.sys b/regress/case-adh-cancel.sys
index a7889c9..47f2007 100644
--- a/regress/case-adh-cancel.sys
+++ b/regress/case-adh-cancel.sys
@@ -71,3 +71,4 @@
close fd=6
close=OK
+0.000961
+ exit 0
diff --git a/regress/case-adh-cancel2.sys b/regress/case-adh-cancel2.sys
index 90f114f..1a6f4fe 100644
--- a/regress/case-adh-cancel2.sys
+++ b/regress/case-adh-cancel2.sys
@@ -57,3 +57,4 @@
close fd=6
close=OK
+0.000149
+ exit 0
diff --git a/regress/case-adh-cancel3.sys b/regress/case-adh-cancel3.sys
index 3e99426..99797d1 100644
--- a/regress/case-adh-cancel3.sys
+++ b/regress/case-adh-cancel3.sys
@@ -88,3 +88,4 @@
close fd=6
close=OK
+0.000686
+ exit 0
diff --git a/regress/case-adh-norm.sys b/regress/case-adh-norm.sys
index fa6cd4b..9283754 100644
--- a/regress/case-adh-norm.sys
+++ b/regress/case-adh-norm.sys
@@ -32,3 +32,4 @@ chiark.greenend.org.uk
close fd=4
close=OK
+0.000290
+ exit 0
diff --git a/regress/case-adh-pipe.sys b/regress/case-adh-pipe.sys
index 6e9ec3c..39af36d 100644
--- a/regress/case-adh-pipe.sys
+++ b/regress/case-adh-pipe.sys
@@ -46,3 +46,4 @@
close fd=6
close=OK
+0.000134
+ exit 0
diff --git a/regress/case-arf-norm.sys b/regress/case-arf-norm.sys
index a9beaf3..83602eb 100644
--- a/regress/case-arf-norm.sys
+++ b/regress/case-arf-norm.sys
@@ -322,3 +322,4 @@
close fd=6
close=OK
+0.000090
+ exit 0
diff --git a/regress/case-arf-text.sys b/regress/case-arf-text.sys
index 4a2ca57..d6cb1f7 100644
--- a/regress/case-arf-text.sys
+++ b/regress/case-arf-text.sys
@@ -61,3 +61,4 @@
close fd=6
close=OK
+0.000117
+ exit 0
diff --git a/regress/case-dh-ptr-aaaa.sys b/regress/case-dh-ptr-aaaa.sys
index dcd7136..8b63bec 100644
--- a/regress/case-dh-ptr-aaaa.sys
+++ b/regress/case-dh-ptr-aaaa.sys
@@ -66,3 +66,4 @@
close fd=6
close=OK
+0.000134
+ exit 0
diff --git a/regress/case-huasenchem.err b/regress/case-huasenchem.err
new file mode 100644
index 0000000..2886e3c
--- /dev/null
+++ b/regress/case-huasenchem.err
@@ -0,0 +1 @@
+adns debug: using nameserver 172.18.45.6
diff --git a/regress/case-huasenchem.in b/regress/case-huasenchem.in
new file mode 100755
index 0000000..51fc369
--- /dev/null
+++ b/regress/case-huasenchem.in
@@ -0,0 +1,16 @@
+--type a
+huasenchem.com
+--type aaaa
+huasenchem.com
+--type ns
+huasenchem.com
+--type mx
+huasenchem.com
+--type ptr
+huasenchem.com
+--type cname
+huasenchem.com
+--type soa
+huasenchem.com
+--type txt
+huasenchem.com
diff --git a/regress/case-huasenchem.out b/regress/case-huasenchem.out
new file mode 100644
index 0000000..b54bda7
--- /dev/null
+++ b/regress/case-huasenchem.out
@@ -0,0 +1,13 @@
+4 0 misquery 200 querydomainwrong huasenchem.com $ "Domain invalid for particular DNS query type"
+6 1 ok 0 ok huasenchem.com $ "OK"
+huasenchem.com SOA ns1.51dns.com dnsadmin@51dns.com 1421895306 28800 3600 604800 86400
+0 1 ok 0 ok huasenchem.com $ "OK"
+huasenchem.com A 104.216.47.20
+1 0 tempfail 60 rcodeservfail huasenchem.com $ "Nameserver reports failure"
+3 0 tempfail 60 rcodeservfail huasenchem.com $ "Nameserver reports failure"
+5 0 tempfail 60 rcodeservfail huasenchem.com $ "Nameserver reports failure"
+7 0 tempfail 60 rcodeservfail huasenchem.com $ "Nameserver reports failure"
+2 2 ok 0 ok huasenchem.com $ "OK"
+huasenchem.com NS ns2.51dns.com tempfail 60 rcodeservfail "Nameserver reports failure" ?
+huasenchem.com NS ns1.51dns.com tempfail 60 rcodeservfail "Nameserver reports failure" ?
+rc=0
diff --git a/regress/case-huasenchem.sys b/regress/case-huasenchem.sys
new file mode 100644
index 0000000..3fec521
--- /dev/null
+++ b/regress/case-huasenchem.sys
@@ -0,0 +1,402 @@
+././adnshost default
+-f -a
+ start 1424302889.352838
+ socket domain=AF_INET type=SOCK_DGRAM
+ socket=6
+ +0.000136
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000048
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000041
+ select max=7 rfds=[0,6] wfds=[] efds=[] to=null
+ select=1 rfds=[0] wfds=[] efds=[]
+ +0.000089
+ read fd=0 buflen=40
+ read=OK
+ 2d2d7479 70652061 0a687561 73656e63 68656d2e 636f6d0a 2d2d7479 70652061
+ 6161610a 68756173.
+ +0.000097
+ sendto fd=6 addr=172.18.45.6:53
+ 311f0100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00010001.
+ sendto=32
+ +0.000213
+ read fd=0 buflen=36
+ read=OK
+ 656e6368 656d2e63 6f6d0a2d 2d747970 65206e73 0a687561 73656e63 68656d2e
+ 636f6d0a.
+ +0.000121
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000144
+ sendto fd=6 addr=172.18.45.6:53
+ 31210100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00020001.
+ sendto=32
+ +0.000156
+ select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999366
+ select=1 rfds=[0] wfds=[] efds=[]
+ +0.000099
+ read fd=0 buflen=40
+ read=OK
+ 2d2d7479 7065206d 780a6875 6173656e 6368656d 2e636f6d 0a2d2d74 79706520
+ 7074720a 68756173.
+ +0.000120
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000172
+ read fd=0 buflen=36
+ read=OK
+ 656e6368 656d2e63 6f6d0a2d 2d747970 6520636e 616d650a 68756173 656e6368
+ 656d2e63.
+ +0.000117
+ read fd=0 buflen=28
+ read=OK
+ 6f6d0a2d 2d747970 6520736f 610a6875 6173656e 6368656d 2e636f6d.
+ +0.000174
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000132
+ read fd=0 buflen=26
+ read=OK
+ 0a2d2d74 79706520 7478740a 68756173 656e6368 656d2e63 6f6d.
+ +0.000103
+ sendto fd=6 addr=172.18.45.6:53
+ 31250100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00060001.
+ sendto=32
+ +0.000161
+ read fd=0 buflen=26
+ read=OK
+ 0a.
+ +0.000068
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000167
+ select max=7 rfds=[0,6] wfds=[] efds=[] to=1.998053
+ select=1 rfds=[0] wfds=[] efds=[]
+ +0.000334
+ read fd=0 buflen=40
+ read=OK
+ .
+ +0.000058
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.997661
+ select=1 rfds=[6] wfds=[] efds=[]
+ +1.092312
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31258180 00010001 0002000c 0a687561 73656e63 68656d03 636f6d00 00060001
+ c00c0006 00010000 170b002b 036e7331 05353164 6e73c017 08646e73 61646d69
+ 6ec03054 c0668a00 00708000 000e1000 093a8000 015180c0 0c000200 01000017
+ 0a000603 6e7332c0 30c00c00 02000100 00170a00 02c02cc0 2c000100 01000002
+ 4600043d 833b40c0 2c000100 01000002 46000479 0c6812c0 2c000100 01000002
+ 46000479 0c6813c0 2c000100 01000002 4600047d 4dc702c0 2c000100 01000002
+ 4600047d 4dc703c0 2c000100 01000002 46000424 f97a80c0 63000100 01000002
+ 47000479 0c6817c0 63000100 01000002 4700047d 4dc708c0 63000100 01000002
+ 4700047d 4dc709c0 63000100 01000002 47000424 f97a81c0 63000100 01000002
+ 4700043d 833b41c0 63000100 01000002 47000479 0c6816.
+ +0.000785
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000138
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.904426
+ select=0 rfds=[] wfds=[] efds=[]
+ +1.-94422
+ sendto fd=6 addr=172.18.45.6:53
+ 311f0100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00010001.
+ sendto=32
+ +0.000231
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000146
+ sendto fd=6 addr=172.18.45.6:53
+ 31210100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00020001.
+ sendto=32
+ +0.000138
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000136
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000087
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000206
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000137
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.998919
+ select=1 rfds=[6] wfds=[] efds=[]
+ +0.011110
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 311f8180 00010001 0002000c 0a687561 73656e63 68656d03 636f6d00 00010001
+ c00c0001 00010000 02480004 68d82f14 c00c0002 00010000 1709000c 036e7332
+ 05353164 6e73c017 c00c0002 00010000 17090006 036e7331 c040c054 00010001
+ 00000245 000424f9 7a80c054 00010001 00000245 00043d83 3b40c054 00010001
+ 00000245 0004790c 6812c054 00010001 00000245 0004790c 6813c054 00010001
+ 00000245 00047d4d c702c054 00010001 00000245 00047d4d c703c03c 00010001
+ 00000246 0004790c 6816c03c 00010001 00000246 0004790c 6817c03c 00010001
+ 00000246 00047d4d c708c03c 00010001 00000246 00047d4d c709c03c 00010001
+ 00000246 000424f9 7a81c03c 00010001 00000246 00043d83 3b41.
+ +0.000580
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000123
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.987106
+ select=1 rfds=[6] wfds=[] efds=[]
+ +0.022653
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31218180 00010002 0000000c 0a687561 73656e63 68656d03 636f6d00 00020001
+ c00c0002 00010000 1709000c 036e7332 05353164 6e73c017 c00c0002 00010000
+ 17090006 036e7331 c030c044 00010001 00000245 00047d4d c703c044 00010001
+ 00000245 000424f9 7a80c044 00010001 00000245 00043d83 3b40c044 00010001
+ 00000245 0004790c 6812c044 00010001 00000245 0004790c 6813c044 00010001
+ 00000245 00047d4d c702c02c 00010001 00000246 00043d83 3b41c02c 00010001
+ 00000246 0004790c 6816c02c 00010001 00000246 0004790c 6817c02c 00010001
+ 00000246 00047d4d c708c02c 00010001 00000246 00047d4d c709c02c 00010001
+ 00000246 000424f9 7a81.
+ +0.000519
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000278
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000214
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000066
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.963376
+ select=0 rfds=[] wfds=[] efds=[]
+ +2.-34493
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000230
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000146
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000138
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000137
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.032765
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.032991
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000219
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000145
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.965994
+ select=0 rfds=[] wfds=[] efds=[]
+ +2.-31871
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000242
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000148
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000138
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000136
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.030843
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.031073
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000220
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000245
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.967798
+ select=0 rfds=[] wfds=[] efds=[]
+ +2.-30061
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000229
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000197
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000199
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000191
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.028780
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.029037
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000219
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000192
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.969736
+ select=0 rfds=[] wfds=[] efds=[]
+ +2.-28091
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000227
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000194
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000199
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000186
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.026874
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.027142
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000217
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000194
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.971641
+ select=0 rfds=[] wfds=[] efds=[]
+ +2.-26204
+ sendto fd=6 addr=172.18.45.6:53
+ 31200100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ sendto=32
+ +0.000239
+ sendto fd=6 addr=172.18.45.6:53
+ 31220100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ sendto=32
+ +0.000196
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000198
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000187
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.024973
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.025246
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000222
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000199
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.973513
+ select=1 rfds=[6] wfds=[] efds=[]
+ +1.323653
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31208182 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 001c0001.
+ +0.000199
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31228182 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 000f0001.
+ +0.000143
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000072
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.649446
+ select=0 rfds=[] wfds=[] efds=[]
+ +1.-349627
+ sendto fd=6 addr=172.18.45.6:53
+ 31240100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ sendto=32
+ +0.000225
+ sendto fd=6 addr=172.18.45.6:53
+ 31260100 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ sendto=32
+ +0.000145
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.024769
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.025017
+ sendto fd=6 addr=172.18.45.6:53
+ 31280100 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000219
+ sendto fd=6 addr=172.18.45.6:53
+ 312a0100 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ sendto=31
+ +0.000231
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.974163
+ select=1 rfds=[6] wfds=[] efds=[]
+ +1.-68982
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 312a8182 00010000 00000000 036e7331 05353164 6e730363 6f6d0000 1c0001.
+ +0.000201
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000076
+ select max=7 rfds=[6] wfds=[] efds=[] to=1.042868
+ select=1 rfds=[6] wfds=[] efds=[]
+ +0.396000
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31248182 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00050001.
+ +0.000190
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31268182 00010000 00000000 0a687561 73656e63 68656d03 636f6d00 00100001.
+ +0.000146
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000074
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.671845
+ select=1 rfds=[6] wfds=[] efds=[]
+ +0.004259
+ recvfrom fd=6 buflen=512
+ recvfrom=OK addr=172.18.45.6:53
+ 31288182 00010000 00000000 036e7332 05353164 6e730363 6f6d0000 1c0001.
+ +0.000221
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000156
+ close fd=6
+ close=OK
+ +0.000001
+ exit 5
diff --git a/regress/case-manyptrwrong.sys b/regress/case-manyptrwrong.sys
index 27c8cac..1dea912 100644
--- a/regress/case-manyptrwrong.sys
+++ b/regress/case-manyptrwrong.sys
@@ -125,9 +125,12 @@ adnstest ncipher -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=1.987296
select=1 rfds=[] wfds=[5] efds=[]
+0.000949
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000147
+ +0.000146
write fd=5
002b3123 01000001 00000000 00000332 35340130 02393903 32303307 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-manyptrwrongrem.sys b/regress/case-manyptrwrongrem.sys
index ccb3530..e427ffc 100644
--- a/regress/case-manyptrwrongrem.sys
+++ b/regress/case-manyptrwrongrem.sys
@@ -319,9 +319,12 @@ adnstest manyptrwrong -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=13.539402
select=1 rfds=[] wfds=[5] efds=[]
+0.008807
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000213
+ +0.000212
write fd=5
002b3123 01000001 00000000 00000332 35340130 02393903 32303307 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-manyptrwrongrst.sys b/regress/case-manyptrwrongrst.sys
index 80e8381..63fe0ef 100644
--- a/regress/case-manyptrwrongrst.sys
+++ b/regress/case-manyptrwrongrst.sys
@@ -403,9 +403,12 @@ adnstest default -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=0.562305
select=1 rfds=[] wfds=[5] efds=[]
+0.001347
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000274
+ +0.000273
write fd=5
002b3123 01000001 00000000 00000332 35340130 02393903 32303307 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-manyptrwrongrty.sys b/regress/case-manyptrwrongrty.sys
index 92be042..3116f80 100644
--- a/regress/case-manyptrwrongrty.sys
+++ b/regress/case-manyptrwrongrty.sys
@@ -164,9 +164,12 @@ adnstest default -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=1.939813
select=1 rfds=[] wfds=[5] efds=[]
+0.001860
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000211
+ +0.000210
write fd=5
002b3123 01000001 00000000 00000332 35340130 02393903 32303307 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-norecurse.sys b/regress/case-norecurse.sys
index f9509d7..16f07d3 100644
--- a/regress/case-norecurse.sys
+++ b/regress/case-norecurse.sys
@@ -109,9 +109,12 @@ adnstest default -0x416
recvfrom fd=4 buflen=512
recvfrom=EAGAIN
+0.000116
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000123
+ +0.000122
write fd=5
002b3123 01000001 00000000 00000134 03323034 02353003 31353807 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-norecurse2.sys b/regress/case-norecurse2.sys
index 2e2b8e5..32057b7 100644
--- a/regress/case-norecurse2.sys
+++ b/regress/case-norecurse2.sys
@@ -538,9 +538,12 @@ adnstest default -0x416
select max=6 rfds=[4] wfds=[5] efds=[] to=13.987312
select=1 rfds=[] wfds=[5] efds=[]
+0.000364
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000127
+ +0.000126
write fd=5
002b3123 01000001 00000000 00000134 03323034 02353003 31353807 696e2d61
64647204 61727061 00000c00 01.
diff --git a/regress/case-srvbaddom.out b/regress/case-srvbaddom.out
index ef5105e..ab3f8d1 100644
--- a/regress/case-srvbaddom.out
+++ b/regress/case-srvbaddom.out
@@ -1 +1 @@
-rc=6
+rc=0
diff --git a/regress/case-srvbaddom.sys b/regress/case-srvbaddom.sys
index 5e03602..a21bb0a 100644
--- a/regress/case-srvbaddom.sys
+++ b/regress/case-srvbaddom.sys
@@ -48,3 +48,4 @@
close fd=6
close=OK
+0.000091
+ exit 6
diff --git a/regress/case-srvha.sys b/regress/case-srvha.sys
index 231c29b..7407b15 100644
--- a/regress/case-srvha.sys
+++ b/regress/case-srvha.sys
@@ -101,3 +101,4 @@
close fd=6
close=OK
+0.006908
+ exit 0
diff --git a/regress/case-srvok.sys b/regress/case-srvok.sys
index b7b4120..234f5ef 100644
--- a/regress/case-srvok.sys
+++ b/regress/case-srvok.sys
@@ -83,3 +83,4 @@
close fd=6
close=OK
+0.004680
+ exit 0
diff --git a/regress/case-srvqudom.out b/regress/case-srvqudom.out
index ef5105e..ab3f8d1 100644
--- a/regress/case-srvqudom.out
+++ b/regress/case-srvqudom.out
@@ -1 +1 @@
-rc=6
+rc=0
diff --git a/regress/case-srvqudom.sys b/regress/case-srvqudom.sys
index a54c484..763dbae 100644
--- a/regress/case-srvqudom.sys
+++ b/regress/case-srvqudom.sys
@@ -102,3 +102,4 @@
close fd=6
close=OK
+0.000078
+ exit 6
diff --git a/regress/case-srvsort.sys b/regress/case-srvsort.sys
index d44fba5..2d343dd 100644
--- a/regress/case-srvsort.sys
+++ b/regress/case-srvsort.sys
@@ -185,3 +185,4 @@
close fd=6
close=OK
+0.014060
+ exit 0
diff --git a/regress/case-tcpallfail.sys b/regress/case-tcpallfail.sys
index a49b1b9..5ddd0ef 100644
--- a/regress/case-tcpallfail.sys
+++ b/regress/case-tcpallfail.sys
@@ -25,9 +25,12 @@ adnstest anarres -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=13.999272
select=1 rfds=[] wfds=[5] efds=[]
+0.000862
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=ECONNREFUSED
- +0.000087
+ +0.000086
close fd=5
close=OK
+0.000109
@@ -49,9 +52,12 @@ adnstest anarres -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=13.999414
select=1 rfds=[] wfds=[5] efds=[]
+0.000339
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=ECONNREFUSED
- +0.000075
+ +0.000074
close fd=5
close=OK
+0.000084
diff --git a/regress/case-tcpautosys.err b/regress/case-tcpautosys.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/regress/case-tcpautosys.err
diff --git a/regress/case-tcpautosys.out b/regress/case-tcpautosys.out
new file mode 100644
index 0000000..eec8895
--- /dev/null
+++ b/regress/case-tcpautosys.out
@@ -0,0 +1,6 @@
+adns debug: using nameserver 172.18.45.6
+chiark.net flags 2 type 15 MX(raw) submitted
+adns debug: TCP connected (NS=172.18.45.6)
+chiark.net flags 2 type MX(raw): OK; nrrs=1; cname=$; owner=$; ttl=3600
+ 10 mx-relay.chiark.greenend.org.uk
+rc=0
diff --git a/regress/case-tcpautosys.sys b/regress/case-tcpautosys.sys
new file mode 100644
index 0000000..287f1ea
--- /dev/null
+++ b/regress/case-tcpautosys.sys
@@ -0,0 +1,69 @@
+./adnstest default -0x10
+:15 2/chiark.net
+ start 1422488885.111730
+ socket domain=AF_INET type=SOCK_DGRAM
+ socket=6
+ +0.000145
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000067
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000058
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000310
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000080
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000086
+ connect fd=7 addr=172.18.45.6:53
+ connect=EINPROGRESS
+ +0.000509
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000159
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=0 rfds=null wfds=[] efds=null
+ +0.000127
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.998729
+ select=1 rfds=[] wfds=[7] efds=[]
+ +0.003195
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000101
+ read fd=7 buflen=1
+ read=EAGAIN
+ +0.000057
+ write fd=7
+ 001c311f 01000001 00000000 00000663 68696172 6b036e65 7400000f 0001.
+ write=30
+ +0.000658
+ select max=8 rfds=[6,7] wfds=[] efds=[7] to=29.994718
+ select=1 rfds=[7] wfds=[] efds=[]
+ +0.085967
+ read fd=7 buflen=2
+ read=OK
+ 00cc.
+ +0.000205
+ read fd=7 buflen=204
+ read=OK
+ 311f8180 00010001 00030004 06636869 61726b03 6e657400 000f0001 c00c000f
+ 00010000 0e100023 000a086d 782d7265 6c617906 63686961 726b0867 7265656e
+ 656e6403 6f726702 756b00c0 0c000200 0100000e 10000c06 63686961 726b026e
+ 73c00cc0 0c000200 0100000e 10000805 73746f72 6dc05ec0 0c000200 0100000e
+ 10000906 70697761 7265c05e c02a0001 00010000 0e100004 d40dc5e5 c06f0001
+ 00010000 0e100004 c2f29d2a c0570001 00010000 0e100004 d40dc5e5 c0830001
+ 00010000 0e100004 d5095d46.
+ +0.000366
+ read fd=7 buflen=206
+ read=EAGAIN
+ +0.000116
+ close fd=6
+ close=OK
+ +0.000194
+ close fd=7
+ close=OK
+ +0.000382
diff --git a/regress/case-tcpautosysmissingserv.err b/regress/case-tcpautosysmissingserv.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/regress/case-tcpautosysmissingserv.err
diff --git a/regress/case-tcpautosysmissingserv.out b/regress/case-tcpautosysmissingserv.out
new file mode 100644
index 0000000..da1c21c
--- /dev/null
+++ b/regress/case-tcpautosysmissingserv.out
@@ -0,0 +1,6 @@
+adns debug: using nameserver 172.18.45.10
+chiark.net flags 2 type 15 MX(raw) submitted
+adns warning: TCP connection failed: connect/read: No route to host (NS=172.18.45.10)
+adns warning: TCP connection failed: connect/read: No route to host (NS=172.18.45.10)
+chiark.net flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604794
+rc=0
diff --git a/regress/case-tcpautosysmissingserv.sys b/regress/case-tcpautosysmissingserv.sys
new file mode 100644
index 0000000..7458fba
--- /dev/null
+++ b/regress/case-tcpautosysmissingserv.sys
@@ -0,0 +1,75 @@
+./adnstest missingserver -0x10
+:15 2/chiark.net
+ start 1422489379.676732
+ socket domain=AF_INET type=SOCK_DGRAM
+ socket=6
+ +0.000107
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000049
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000041
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000190
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000041
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000037
+ connect fd=7 addr=172.18.45.10:53
+ connect=EINPROGRESS
+ +0.000164
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000087
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=0 rfds=null wfds=[] efds=null
+ +0.000094
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.999387
+ select=1 rfds=[] wfds=[7] efds=[]
+ +3.012183
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000139
+ read fd=7 buflen=1
+ read=EHOSTUNREACH
+ +0.000129
+ close fd=7
+ close=OK
+ +0.000202
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000113
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000359
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000084
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000093
+ connect fd=7 addr=172.18.45.10:53
+ connect=EINPROGRESS
+ +0.000175
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.999289
+ select=1 rfds=[] wfds=[7] efds=[]
+ +3.006034
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000150
+ read fd=7 buflen=1
+ read=EHOSTUNREACH
+ +0.000065
+ close fd=7
+ close=OK
+ +0.000179
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000122
+ close fd=6
+ close=OK
+ +0.000177
diff --git a/regress/case-tcpblock.sys b/regress/case-tcpblock.sys
index 027df17..5dc1bdf 100644
--- a/regress/case-tcpblock.sys
+++ b/regress/case-tcpblock.sys
@@ -25,9 +25,12 @@ adnstest anarres -0x400
select max=6 rfds=[4] wfds=[5] efds=[] to=13.999290
select=1 rfds=[] wfds=[5] efds=[]
+0.000937
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000090
+ +0.000089
write fd=5
0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
74790867 7265656e 656e6403 6f726702 756b0000 010001.
diff --git a/regress/case-tcpblockbrk.sys b/regress/case-tcpblockbrk.sys
index 679d0d4..d22d17e 100644
--- a/regress/case-tcpblockbrk.sys
+++ b/regress/case-tcpblockbrk.sys
@@ -25,9 +25,12 @@ adnstest anarres -0x700
select max=7 rfds=[5] wfds=[6] efds=[] to=13.996699
select=1 rfds=[] wfds=[6] efds=[]
+0.003661
+ select max=7 rfds=null wfds=[6] efds=null to=0.000000
+ select=1 rfds=null wfds=[6] efds=null
++0.000001
read fd=6 buflen=1
read=EAGAIN
- +0.000477
+ +0.000476
write fd=6
0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
74790867 7265656e 656e6403 6f726702 756b0000 010001.
@@ -125,9 +128,12 @@ adnstest anarres -0x700
select max=7 rfds=[5] wfds=[6] efds=[] to=13.996686
select=1 rfds=[] wfds=[6] efds=[]
+0.000977
+ select max=7 rfds=null wfds=[6] efds=null to=0.000000
+ select=1 rfds=null wfds=[6] efds=null
++0.000001
read fd=6 buflen=1
read=ECONNREFUSED
- +0.000450
+ +0.000449
close fd=6
close=OK
+0.000617
diff --git a/regress/case-tcpblockwr.sys b/regress/case-tcpblockwr.sys
index e232d28..07644f1 100644
--- a/regress/case-tcpblockwr.sys
+++ b/regress/case-tcpblockwr.sys
@@ -25,9 +25,12 @@ adnstest anarres -0x700
select max=7 rfds=[5] wfds=[6] efds=[] to=13.996721
select=1 rfds=[] wfds=[6] efds=[]
+0.278976
+ select max=7 rfds=null wfds=[6] efds=null to=0.000000
+ select=1 rfds=null wfds=[6] efds=null
++0.000001
read fd=6 buflen=1
read=EAGAIN
- +0.001048
+ +0.001047
write fd=6
0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
74790867 7265656e 656e6403 6f726702 756b0000 010001.
diff --git a/regress/case-tcpbreakin.sys b/regress/case-tcpbreakin.sys
index d20b0d9..e64e26f 100644
--- a/regress/case-tcpbreakin.sys
+++ b/regress/case-tcpbreakin.sys
@@ -25,9 +25,12 @@ adnstest default
select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928
select=1 rfds=[] wfds=[5] efds=[]
+0.000536
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000118
+ +0.000117
write fd=5
002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164
64720461 72706100 000c0001.
@@ -81,9 +84,12 @@ adnstest default
select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928
select=1 rfds=[] wfds=[5] efds=[]
+0.000536
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000723
+ +0.000722
write fd=5
00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669
74790867 7265656e 656e6403 6f726702 756b0000 010001.
diff --git a/regress/case-tcpmultipart.sys b/regress/case-tcpmultipart.sys
index 8f59ea9..37cc29c 100644
--- a/regress/case-tcpmultipart.sys
+++ b/regress/case-tcpmultipart.sys
@@ -25,9 +25,12 @@ adnstest tunnel
select max=6 rfds=[4] wfds=[5] efds=[] to=13.998324
select=1 rfds=[] wfds=[5] efds=[]
+1.-647444
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000176
+ +0.000175
write fd=5
002d311f 01000001 00000000 00000331 33320237 36033232 34033139 3507696e
2d616464 72046172 70610000 0c0001.
diff --git a/regress/case-tcpptr.sys b/regress/case-tcpptr.sys
index 662689c..14fc6a4 100644
--- a/regress/case-tcpptr.sys
+++ b/regress/case-tcpptr.sys
@@ -25,9 +25,12 @@ adnstest default
select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928
select=1 rfds=[] wfds=[5] efds=[]
+0.000536
+ select max=6 rfds=null wfds=[5] efds=null to=0.000000
+ select=1 rfds=null wfds=[5] efds=null
++0.000001
read fd=5 buflen=1
read=EAGAIN
- +0.000118
+ +0.000117
write fd=5
002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164
64720461 72706100 000c0001.
diff --git a/regress/case-unknown2.sys b/regress/case-unknown2.sys
index 0a1f593..88ff570 100644
--- a/regress/case-unknown2.sys
+++ b/regress/case-unknown2.sys
@@ -64,3 +64,4 @@
close fd=6
close=OK
+0.000187
+ exit 0
diff --git a/regress/case-unknown33.sys b/regress/case-unknown33.sys
index 7a6c122..fc567e5 100644
--- a/regress/case-unknown33.sys
+++ b/regress/case-unknown33.sys
@@ -35,3 +35,4 @@
close fd=6
close=OK
+0.002395
+ exit 0
diff --git a/regress/case-unknown5.sys b/regress/case-unknown5.sys
index 4a436c4..5b019f9 100644
--- a/regress/case-unknown5.sys
+++ b/regress/case-unknown5.sys
@@ -43,3 +43,4 @@
close fd=6
close=OK
+0.000144
+ exit 0
diff --git a/regress/checkall b/regress/checkall
index 5b405c4..a404fa8 100755
--- a/regress/checkall
+++ b/regress/checkall
@@ -3,7 +3,7 @@
# runs all test cases
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/harness.h b/regress/harness.h
index eae4206..85a936b 100644
--- a/regress/harness.h
+++ b/regress/harness.h
@@ -41,4 +41,6 @@ void Tvba(const char *str);
extern vbuf vb;
extern struct timeval currenttime;
extern const struct Terrno { const char *n; int v; } Terrnos[];
+/* Special cases */
+void Texit(int rv) NONRETURNING;
#endif
diff --git a/regress/harness.h.m4 b/regress/harness.h.m4
index bf4f308..5d17ca3 100644
--- a/regress/harness.h.m4
+++ b/regress/harness.h.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - function and other declarations
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
@@ -67,5 +67,9 @@ void Tvba(const char *str);
extern vbuf vb;
extern struct timeval currenttime;
extern const struct Terrno { const char *n; int v; } Terrnos[];
+
+/* Special cases */
+void Texit(int rv) NONRETURNING;
+
#endif
diff --git a/regress/hcommon.c b/regress/hcommon.c
index ebbef94..0aa3ffb 100644
--- a/regress/hcommon.c
+++ b/regress/hcommon.c
@@ -167,6 +167,10 @@ void Tvbbytes(const void *buf, int len) {
void Tvbfdset(int max, const fd_set *fds) {
int i;
const char *comma= "";
+ if (!fds) {
+ Tvba("null");
+ return;
+ }
Tvba("[");
for (i=0; i<max; i++) {
if (!FD_ISSET(i,fds)) continue;
@@ -281,11 +285,11 @@ void *Hrealloc(void *op, size_t nsz) {
size_t osz;
if (op) { oldnode= (void*)((char*)op - MALLOCHSZ); osz= oldnode->sz; } else { osz= 0; }
np= Hmalloc(nsz);
- memcpy(np,op, osz>nsz ? nsz : osz);
+ if (osz) memcpy(np,op, osz>nsz ? nsz : osz);
Hfree(op);
return np;
}
-void Hexit(int rv) {
+void Texit(int rv) {
struct malloced *loopnode;
Tshutdown();
adns__vbuf_free(&vb);
@@ -299,6 +303,12 @@ void Hexit(int rv) {
}
exit(rv);
}
+void Hexit(int rv) {
+ vb.used= 0;
+ Tvbf("exit %d", rv);
+ Q_vb();
+ Texit(0);
+}
pid_t Hgetpid(void) {
return 2264; /* just some number */
}
diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4
index c5069ee..6f29b41 100644
--- a/regress/hcommon.c.m4
+++ b/regress/hcommon.c.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - routines used for both record and playback
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
@@ -160,6 +160,11 @@ void Tvbfdset(int max, const fd_set *fds) {
int i;
const char *comma= "";
+ if (!fds) {
+ Tvba("null");
+ return;
+ }
+
Tvba("[");
for (i=0; i<max; i++) {
if (!FD_ISSET(i,fds)) continue;
@@ -301,12 +306,12 @@ void *Hrealloc(void *op, size_t nsz) {
if (op) { oldnode= (void*)((char*)op - MALLOCHSZ); osz= oldnode->sz; } else { osz= 0; }
np= Hmalloc(nsz);
- memcpy(np,op, osz>nsz ? nsz : osz);
+ if (osz) memcpy(np,op, osz>nsz ? nsz : osz);
Hfree(op);
return np;
}
-void Hexit(int rv) {
+void Texit(int rv) {
struct malloced *loopnode;
Tshutdown();
@@ -322,6 +327,13 @@ void Hexit(int rv) {
exit(rv);
}
+void Hexit(int rv) {
+ vb.used= 0;
+ Tvbf("exit %d", rv);
+ Q_vb();
+ Texit(0);
+}
+
pid_t Hgetpid(void) {
return 2264; /* just some number */
}
diff --git a/regress/hmacros.i4 b/regress/hmacros.i4
index 7212394..123b8a3 100644
--- a/regress/hmacros.i4
+++ b/regress/hmacros.i4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - common macros
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/hplayback.c b/regress/hplayback.c
index 279934c..ed23542 100644
--- a/regress/hplayback.c
+++ b/regress/hplayback.c
@@ -102,6 +102,10 @@ static void P_updatetime(void) {
static void Pfdset(fd_set *set, int max) {
int r, c;
char *ep;
+ if (!set) {
+ Pstring("null","null fdset pointer");
+ return;
+ }
if (vb2.buf[vb2.used++] != '[') Psyntax("fd set start not [");
FD_ZERO(set);
if (vb2.buf[vb2.used] == ']') { vb2.used++; return; }
diff --git a/regress/hplayback.c.m4 b/regress/hplayback.c.m4
index 475144a..ad27a9a 100644
--- a/regress/hplayback.c.m4
+++ b/regress/hplayback.c.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - playback routines
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
@@ -150,6 +150,11 @@ static void P_updatetime(void) {
static void Pfdset(fd_set *set, int max) {
int r, c;
char *ep;
+
+ if (!set) {
+ Pstring("null","null fdset pointer");
+ return;
+ }
if (vb2.buf[vb2.used++] != hm_squote[hm_squote) Psyntax("fd set start not [");
FD_ZERO(set);
diff --git a/regress/hrecord.c.m4 b/regress/hrecord.c.m4
index 6e50efb..b9d5a73 100644
--- a/regress/hrecord.c.m4
+++ b/regress/hrecord.c.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - recording routines
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/hredirect.h.m4 b/regress/hredirect.h.m4
index 8111640..ccb48f0 100644
--- a/regress/hredirect.h.m4
+++ b/regress/hredirect.h.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - redefinitions of system calls
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/hsyscalls.h.m4 b/regress/hsyscalls.h.m4
index 3abb5e7..7400895 100644
--- a/regress/hsyscalls.h.m4
+++ b/regress/hsyscalls.h.m4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - prototypes of redefinitions of system calls
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/hsyscalls.i4 b/regress/hsyscalls.i4
index 2efa879..a480e6a 100644
--- a/regress/hsyscalls.i4
+++ b/regress/hsyscalls.i4
@@ -3,7 +3,7 @@ m4_dnl (part of complex test harness, not of the library)
m4_dnl - list of syscalls to override/log and their args
m4_dnl This file is part of adns, which is
-m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/init-missingserver.text b/regress/init-missingserver.text
new file mode 100644
index 0000000..5dc8e47
--- /dev/null
+++ b/regress/init-missingserver.text
@@ -0,0 +1 @@
+nameserver 172.18.45.10
diff --git a/regress/m1test b/regress/m1test
index a662ed2..e5411dc 100755
--- a/regress/m1test
+++ b/regress/m1test
@@ -3,7 +3,7 @@
# test recording script
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/r1test b/regress/r1test
index d160782..e03ba02 100755
--- a/regress/r1test
+++ b/regress/r1test
@@ -3,7 +3,7 @@
# test execution script, for running one test
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/regress/sys-rc-convert b/regress/sys-rc-convert
new file mode 100755
index 0000000..37e60e0
--- /dev/null
+++ b/regress/sys-rc-convert
@@ -0,0 +1,7 @@
+#!/bin/sh
+f=$1
+o=${f%.sys}.out
+rc=`sed -n '$s/^rc=//p' $o`
+sed -e '$s/^rc=.*/rc=0/' $o >$o.new
+mv $o.new $o
+echo " exit $rc" >>$f
diff --git a/settings.make.in b/settings.make.in
index 3e14589..47eaaa7 100644
--- a/settings.make.in
+++ b/settings.make.in
@@ -2,7 +2,7 @@
# used by autoconf/configure to generate settings.make
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/Makefile.in b/src/Makefile.in
index 6557f59..449289b 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
# src/Makefile[.in] - library main Makefile
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/addrfam.c b/src/addrfam.c
index 5067048..0ba2049 100644
--- a/src/addrfam.c
+++ b/src/addrfam.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/adns.make b/src/adns.make
index 8c2af75..076df8b 100644
--- a/src/adns.make
+++ b/src/adns.make
@@ -1,7 +1,7 @@
# src/adns.make - library definitions, including list of object files
#
# This file is part of adns, which is
-# Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+# Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
# Copyright (C) 2014 Mark Wooding
# Copyright (C) 1999-2000,2003,2006 Tony Finch
# Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/check.c b/src/check.c
index 08fe163..fcf1995 100644
--- a/src/check.c
+++ b/src/check.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/dlist.h b/src/dlist.h
index db95c60..8d83af2 100644
--- a/src/dlist.h
+++ b/src/dlist.h
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/event.c b/src/event.c
index 3dd927b..dcc49e9 100644
--- a/src/event.c
+++ b/src/event.c
@@ -6,7 +6,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -339,7 +339,8 @@ int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS]) {
}
int adns_processreadable(adns_state ads, int fd, const struct timeval *now) {
- int want, dgramlen, r, i, udpaddrlen, serv, old_skip;
+ int want, dgramlen, r, i, serv, old_skip;
+ socklen_t udpaddrlen;
byte udpbuf[DNS_MAXUDP];
char addrbuf[ADNS_ADDR2TEXT_BUFLEN];
struct udpsocket *udp;
@@ -443,6 +444,22 @@ int adns_processwriteable(adns_state ads, int fd, const struct timeval *now) {
assert(ads->tcprecv.used==0);
assert(ads->tcprecv_skip==0);
for (;;) {
+ /* This function can be called even if the fd wasn't actually
+ * flagged as writeable. For asynch tcp connect we have to
+ * actually use the writeability to tell us the connect has
+ * completed (or failed), so we need to double check. */
+ fd_set writeable;
+ struct timeval timeout = { 0,0 };
+ FD_ZERO(&writeable);
+ FD_SET(ads->tcpsocket,&writeable);
+ r= select(ads->tcpsocket+1,0,&writeable,0,&timeout);
+ if (r==0) break;
+ if (r<0) {
+ if (errno==EINTR) continue;
+ adns__tcp_broken(ads,"select","failed connecting writeability check");
+ r= 0; goto xit;
+ }
+ assert(FD_ISSET(ads->tcpsocket,&writeable));
if (!adns__vbuf_ensure(&ads->tcprecv,1)) { r= ENOMEM; goto xit; }
r= read(ads->tcpsocket,&ads->tcprecv.buf,1);
if (r==0 || (r<0 && (errno==EAGAIN || errno==EWOULDBLOCK))) {
diff --git a/src/general.c b/src/general.c
index b1ae2be..c4d1f55 100644
--- a/src/general.c
+++ b/src/general.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/internal.h b/src/internal.h
index 9334a6f..00cf825 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -6,7 +6,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/parse.c b/src/parse.c
index caedf15..07d0614 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/poll.c b/src/poll.c
index 305b275..75bc192 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/query.c b/src/query.c
index ff56fc3..480cbf5 100644
--- a/src/query.c
+++ b/src/query.c
@@ -6,7 +6,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/reply.c b/src/reply.c
index 7d11327..bd2d0e8 100644
--- a/src/reply.c
+++ b/src/reply.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/setup.c b/src/setup.c
index 7171f5b..8ff92d2 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -113,9 +113,11 @@ static void ccf_nameserver(adns_state ads, const char *fn,
adns_rr_addr a;
char addrbuf[ADNS_ADDR2TEXT_BUFLEN];
int err;
+ socklen_t salen;
- a.len= sizeof(a.addr);
- err= adns_text2addr(buf,DNS_PORT, 0, &a.addr.sa,&a.len);
+ salen= sizeof(a.addr);
+ err= adns_text2addr(buf,DNS_PORT, 0, &a.addr.sa,&salen);
+ a.len= salen;
switch (err) {
case 0:
break;
@@ -129,7 +131,7 @@ static void ccf_nameserver(adns_state ads, const char *fn,
}
adns__debug(ads,-1,0,"using nameserver %s",
adns__sockaddr_ntoa(&a.addr.sa, addrbuf));
- addserver(ads,&a.addr.sa,a.len);
+ addserver(ads,&a.addr.sa,salen);
}
static void ccf_search(adns_state ads, const char *fn,
@@ -167,7 +169,7 @@ static void ccf_search(adns_state ads, const char *fn,
static int gen_pton(const char *text, int want_af, adns_sockaddr *a) {
int err;
- int len;
+ socklen_t len;
len= sizeof(*a);
err= adns_text2addr(text,0, adns_qf_addrlit_scope_forbid,
diff --git a/src/transmit.c b/src/transmit.c
index 9cef6db..33c3329 100644
--- a/src/transmit.c
+++ b/src/transmit.c
@@ -5,7 +5,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/tvarith.h b/src/tvarith.h
index 1492dd6..fe3b78d 100644
--- a/src/tvarith.h
+++ b/src/tvarith.h
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
diff --git a/src/types.c b/src/types.c
index d65e155..a4478fa 100644
--- a/src/types.c
+++ b/src/types.c
@@ -4,7 +4,7 @@
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
* Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
@@ -892,6 +892,7 @@ static void icb_hostaddr(adns_query parent, adns_query child) {
done:
if (st) {
adns__free_interim(parent, rrp->addrs);
+ rrp->addrs = 0;
rrp->naddrs= (st>0 && st<=adns_s_max_tempfail) ? -1 : 0;
}