Index: adns/INSTALL diff -u adns/INSTALL:1.4 adns/INSTALL:1.7 --- adns/INSTALL:1.4 Wed Nov 24 16:57:32 1999 +++ adns/INSTALL Sun May 7 23:37:18 2000 @@ -1,5 +1,8 @@ INSTALLATION INSTRUCTIONS for ADNS +1. Read the security note below. + +2. Standard GNU package build process: $ ./configure $ make # make install @@ -29,14 +32,37 @@ You will probably find that GNU Make is required. +SECURITY AND PERFORMANCE - AN IMPORTANT NOTE + +adns is not a full-service resolver. It does no caching of responses +at all, and has no defence against bad nameservers or fake packets +which appear to come from your real nameservers. It relies on the +full-service resolvers listed in resolv.conf to handle these tasks. + +For secure and reasonable operation you MUST run a full-service +nameserver on the same system as your adns applications, or on the +same local, fully trusted network. You MUST only list such +nameservers in the adns configuration (eg resolv.conf). + +You MUST use a firewall or other means to block packets which appear +to come from these nameservers, but which were actually sent by other, +untrusted, entities. + +Furthermore, adns is not DNSSEC-aware in this version; it doesn't +understand even how to ask a DNSSEC-aware nameserver to perform the +DNSSEC cryptographic signature checking. + + COPYRIGHT This file, INSTALL, contains installation instructions and other -details for adns. +details for adns. It is + Copyright (C) 1997-2000 Ian Jackson adns is - Copyright (C) 1997-1999 Ian Jackson - Copyright (C) 1999 Tony Finch + Copyright (C) 1997-2000 Ian Jackson + Copyright (C) 1999 Tony Finch [1] + Copyright (C) 1991 Massachusetts Institute of Technology [2] 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 @@ -52,6 +78,11 @@ along with userv as the file COPYING; if not, email me at the address above or write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +[1] Tony Finch holds the original copyright on + client/adnslogres.c and client/fanftest.c. +[2] MIT hold the original copyright on the included install-sh, + which came via GNU autoconf. # Local variables: # mode: text Index: adns/Makefile.in diff -u adns/Makefile.in:1.18 adns/Makefile.in:1.19 --- adns/Makefile.in:1.18 Thu Mar 2 01:57:37 2000 +++ adns/Makefile.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -DISTVERSION= 0.7 +DISTVERSION= 0.8 srcdir= @srcdir@ VPATH= @srcdir@ Index: adns/README diff -u adns/README:1.7 adns/README:1.8 --- adns/README:1.7 Thu Mar 2 01:55:58 2000 +++ adns/README Sun May 7 23:37:18 2000 @@ -112,7 +112,8 @@ Copyright and licensing - adns is Copyright 1997-1999 Ian Jackson and Copyright 1999 Tony Finch. + adns is Copyright 1997-2000 Ian Jackson, Copyright 1999 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 @@ -135,7 +136,7 @@ [17]GNU home page; [18]chiark home page; [19]site or mirror home page - This web page is Copyright (C)1996-1999 Ian Jackson. See the + This web page is Copyright (C)1996-2000 Ian Jackson. See the [20]Copyright/acknowledgements. Use any browser - [21]Campaign for a non-browser-specific WWW Index: adns/acconfig.h diff -u adns/acconfig.h:1.5 adns/acconfig.h:1.6 --- adns/acconfig.h:1.5 Sun Oct 10 14:16:23 1999 +++ adns/acconfig.h Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/changelog diff -u adns/changelog:1.86 adns/changelog:1.100 --- adns/changelog:1.86 Thu Mar 2 01:55:58 2000 +++ adns/changelog Sun May 7 23:37:18 2000 @@ -1,3 +1,36 @@ +adns (0.8) BETA; urgency=medium + + Bugfixes: + * Race near adns_beforeselect which could cause infinite timeout fixed + (it's now less agressive, and will more often return a zero timeout.) + * Fixed infrequent race causing assertion failure in adns__tcp_broken + `ads->tcpstate == server_connecting || ads->tcpstate == server_ok'. + * Spurious `server failure on unidentifiable query' warning suppressed. + * If we get a referral, don't also always complain falsely about RD==0. + * adnslogres: cast chars to unsigned char before using ctype.h macros. + * In _beforeselect, global failure now means zero timeout, and in + tcp_events, really never try to do anything with the TCP connection if + act is zero. This might possibly cause an infinite delay (ie, lockup) + if things go badly wrong *and* a really unlikely race happens. + * Test suite `lines of syscall left' value is correct; !0 is failure. + + Portability fixes: + * install-sh (from autoconf 2.12 Debian r13) included. + * adnslogres: do not call equivalent of printf("%.*s",0,(char*)0). + + Documentation improvements: + * Security/performance note added, about local nameservers and DNSSEC. + * Documented that adns_rr_info _rr_hostaddr ( ) for address list + means permanent failure, and ? means temporary failure. + * Typo (*now for now in _beforeselect description) in adns.h fixed. + * Copyright notices updated. + + Changes to produce more defensive code: + * In adns_wait, assert that the timeout is not infinite. + * Make qu->id start out as -2 when initially allocated. + + -- Ian Jackson Sun, 7 May 2000 23:37:13 +0100 + adns (0.7) BETA; urgency=medium * New adns_submit_reverse_any for eg RBL lookups, and corresponding Index: adns/configure.in diff -u adns/configure.in:1.11 adns/configure.in:1.12 --- adns/configure.in:1.11 Wed Nov 24 16:57:32 1999 +++ adns/configure.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/install-sh diff -u /dev/null adns/install-sh:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/install-sh Mon Mar 20 01:46:07 2000 @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 Index: adns/settings.make.in diff -u adns/settings.make.in:1.12 adns/settings.make.in:1.13 --- adns/settings.make.in:1.12 Wed Oct 13 02:16:30 1999 +++ adns/settings.make.in Sun May 7 23:37:18 2000 @@ -5,7 +5,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/client/Makefile.in diff -u adns/client/Makefile.in:1.20 adns/client/Makefile.in:1.21 --- adns/client/Makefile.in:1.20 Wed Nov 24 16:57:32 1999 +++ adns/client/Makefile.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/client/adh-main.c diff -u adns/client/adh-main.c:1.10 adns/client/adh-main.c:1.11 --- adns/client/adh-main.c:1.10 Thu Mar 2 01:34:04 2000 +++ adns/client/adh-main.c Sun May 7 23:37:18 2000 @@ -5,10 +5,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/adh-opts.c diff -u adns/client/adh-opts.c:1.11 adns/client/adh-opts.c:1.12 --- adns/client/adh-opts.c:1.11 Thu Mar 2 01:34:04 2000 +++ adns/client/adh-opts.c Sun May 7 23:37:18 2000 @@ -5,10 +5,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/adh-query.c diff -u adns/client/adh-query.c:1.12 adns/client/adh-query.c:1.13 --- adns/client/adh-query.c:1.12 Thu Mar 2 01:34:04 2000 +++ adns/client/adh-query.c Sun May 7 23:37:18 2000 @@ -5,10 +5,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/adnshost.h diff -u adns/client/adnshost.h:1.11 adns/client/adnshost.h:1.12 --- adns/client/adnshost.h:1.11 Thu Mar 2 01:34:04 2000 +++ adns/client/adnshost.h Sun May 7 23:37:18 2000 @@ -4,10 +4,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/adnslogres.c diff -u adns/client/adnslogres.c:1.7 adns/client/adnslogres.c:1.10 --- adns/client/adnslogres.c:1.7 Fri Oct 15 17:46:14 1999 +++ adns/client/adnslogres.c Tue Apr 11 22:15:39 2000 @@ -5,10 +5,10 @@ /* * This file is * Copyright (C) 1999 Tony Finch - * Copyright (C) 1999 Ian Jackson + * Copyright (C) 1999-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -25,12 +25,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * This version was originally supplied by Tony Finch, but has been - * modified by Ian Jackson as it was incorporated into adns. + * This version was originally supplied by Tony Finch, but has been + * modified by Ian Jackson as it was incorporated into adns and + * subsequently. */ static const char * const cvsid = - "$Id: adnslogres.c,v 1.7 1999/10/15 16:46:14 ian Exp $"; + "$Id: adnslogres.c,v 1.10 2000/04/11 21:15:39 ian Exp $"; #include #include @@ -57,7 +58,11 @@ static const char *progname; #define msg(fmt, args...) fprintf(stderr, "%s: " fmt "\n", progname, ##args) +#define guard_null(str) ((str) ? (str) : "") +#define sensible_ctype(type,ch) (type((unsigned char)(ch))) + /* isfoo() functions from ctype.h can't safely be fed char - blech ! */ + static void aargh(const char *cause) { const char *why = strerror(errno); if (!why) why = "Unknown error"; @@ -75,7 +80,7 @@ ptrs[0]= start; retry: - while (!isdigit(*ptrs[0])) + while (!sensible_ctype(isdigit,*ptrs[0])) if (!*ptrs[0]++) { strcpy(buf, "invalid."); *addr= *rest= NULL; @@ -83,8 +88,8 @@ } for (i= 1; i < 5; i++) { ptrs[i]= ptrs[i-1]; - while (isdigit(*ptrs[i]++)); - if ((i == 4 && !isspace(ptrs[i][-1])) || + while (sensible_ctype(isdigit,*ptrs[i]++)); + if ((i == 4 && !sensible_ctype(isspace,ptrs[i][-1])) || (i != 4 && ptrs[i][-1] != '.') || (ptrs[i]-ptrs[i-1] > 4)) { ptrs[0]= ptrs[i]-1; @@ -129,7 +134,7 @@ strcpy(line->start, buf); str= ipaddr2domain(line->start, &line->addr, &line->rest); if (opts & OPT_DEBUG) - msg("submitting %.*s -> %s", line->rest-line->addr, line->addr, str); + msg("submitting %.*s -> %s", line->rest-line->addr, guard_null(line->addr), str); if (adns_submit(adns, str, adns_r_ptr, adns_qf_quoteok_cname|adns_qf_cname_loose, NULL, &line->query)) @@ -154,7 +159,7 @@ while (head) { if (opts & OPT_DEBUG) msg("%d in queue; checking %.*s", len, - head->rest-head->addr, head->addr); + head->rest-head->addr, guard_null(head->addr)); if (eof || len > MAXPENDING) if (opts & OPT_POLL) err= adns_wait_poll(adns, &head->query, &answer, NULL); Index: adns/client/adnsresfilter.c diff -u adns/client/adnsresfilter.c:1.6 adns/client/adnsresfilter.c:1.7 --- adns/client/adnsresfilter.c:1.6 Wed Nov 24 17:10:56 1999 +++ adns/client/adnsresfilter.c Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/adnstest.c diff -u adns/client/adnstest.c:1.39 adns/client/adnstest.c:1.40 --- adns/client/adnstest.c:1.39 Tue Nov 2 23:40:14 1999 +++ adns/client/adnstest.c Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/client/fanftest.c diff -u adns/client/fanftest.c:1.2 adns/client/fanftest.c:1.3 --- adns/client/fanftest.c:1.2 Fri Oct 15 17:46:57 1999 +++ adns/client/fanftest.c Sun May 7 23:37:18 2000 @@ -8,7 +8,7 @@ * Copyright (C) 1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ */ static const char * const cvsid = - "$Id: fanftest.c,v 1.2 1999/10/15 16:46:57 ian Exp $"; + "$Id: fanftest.c,v 1.3 2000/05/07 22:37:18 ian Exp $"; #include #include Index: adns/dynamic/Makefile.in diff -u adns/dynamic/Makefile.in:1.10 adns/dynamic/Makefile.in:1.11 --- adns/dynamic/Makefile.in:1.10 Fri Oct 15 18:57:50 1999 +++ adns/dynamic/Makefile.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/regress/Makefile.in diff -u adns/regress/Makefile.in:1.12 adns/regress/Makefile.in:1.13 --- adns/regress/Makefile.in:1.12 Tue Nov 2 23:40:14 1999 +++ adns/regress/Makefile.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/regress/addcases diff -u adns/regress/addcases:1.4 adns/regress/addcases:1.5 --- adns/regress/addcases:1.4 Sat Apr 17 16:40:20 1999 +++ adns/regress/addcases Sun May 7 23:37:18 2000 @@ -1,5 +1,26 @@ #!/bin/sh # usage: ./addcases ... +# +# This file is +# Copyright (C) 1998-2000 Ian Jackson +# +# It is part of adns, which is +# Copyright (C) 1997-2000 Ian Jackson +# Copyright (C) 1999 Tony Finch +# +# This program 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 Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. set -e Index: adns/regress/case-1stservbroken.sys diff -u adns/regress/case-1stservbroken.sys:1.2 adns/regress/case-1stservbroken.sys:1.3 --- adns/regress/case-1stservbroken.sys:1.2 Sat Oct 16 20:43:26 1999 +++ adns/regress/case-1stservbroken.sys Sun May 7 16:30:18 2000 @@ -86,9 +86,12 @@ close fd=5 close=OK +0.000687 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 socket type=SOCK_STREAM socket=5 - +0.004866 + +0.004865 fcntl fd=5 cmd=F_GETFL fcntl=~O_NONBLOCK&... +0.000611 @@ -98,7 +101,7 @@ connect fd=5 addr=172.18.45.6:53 connect=EINPROGRESS +0.001082 - select max=6 rfds=[4] wfds=[5] efds=[] to=14.000000 + select max=6 rfds=[4] wfds=[5] efds=[] to=13.992868 select=1 rfds=[] wfds=[5] efds=[] +0.001011 read fd=5 buflen=1 Index: adns/regress/case-2ndservtcp.sys diff -u adns/regress/case-2ndservtcp.sys:1.1 adns/regress/case-2ndservtcp.sys:1.2 --- adns/regress/case-2ndservtcp.sys:1.1 Sat Oct 16 20:04:06 1999 +++ adns/regress/case-2ndservtcp.sys Sun May 7 16:30:18 2000 @@ -71,19 +71,22 @@ close fd=5 close=OK +0.000146 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 socket type=SOCK_STREAM socket=5 +0.000678 fcntl fd=5 cmd=F_GETFL fcntl=~O_NONBLOCK&... - +0.000042 + +0.000041 fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... fcntl=OK +0.000039 connect fd=5 addr=172.18.45.6:53 connect=EINPROGRESS +0.000455 - select max=6 rfds=[4] wfds=[5] efds=[] to=14.000000 + select max=6 rfds=[4] wfds=[5] efds=[] to=13.998787 select=1 rfds=[] wfds=[5] efds=[] +0.000135 read fd=5 buflen=1 Index: adns/regress/case-abbrevto.sys diff -u adns/regress/case-abbrevto.sys:1.1 adns/regress/case-abbrevto.sys:1.2 --- adns/regress/case-abbrevto.sys:1.1 Thu Jun 17 01:54:00 1999 +++ adns/regress/case-abbrevto.sys Sun May 7 16:30:18 2000 @@ -264,11 +264,14 @@ 01. sendto=33 +0.000427 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.36:53 31200100 00010000 00000000 08677265 656e656e 64036f72 6702756b 00000200 01. sendto=33 - +0.000318 + +0.000317 sendto fd=4 addr=172.18.45.36:53 31210100 00010000 00000000 08677265 656e656e 64036f72 6702756b 00000500 01. @@ -334,7 +337,7 @@ 01. sendto=33 +0.000274 - select max=5 rfds=[4] wfds=[] efds=[] to=1.999573 + select max=5 rfds=[4] wfds=[] efds=[] to=1.995581 select=0 rfds=[] wfds=[] efds=[] +2.-04960 select max=5 rfds=[4] wfds=[] efds=[] to=0.000541 Index: adns/regress/case-datapluscnamewait.sys diff -u adns/regress/case-datapluscnamewait.sys:1.1 adns/regress/case-datapluscnamewait.sys:1.2 --- adns/regress/case-datapluscnamewait.sys:1.1 Thu Aug 5 01:03:21 1999 +++ adns/regress/case-datapluscnamewait.sys Sun May 7 16:30:18 2000 @@ -247,12 +247,15 @@ 64647204 61727061 00000100 01. sendto=45 +0.001211 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31200100 00010000 00000000 03313730 02393903 32313903 31393407 696e2d61 64647204 61727061 00000200 01. sendto=45 - +0.001067 - select max=5 rfds=[4] wfds=[] efds=[] to=0.019298 + +0.001066 + select max=5 rfds=[4] wfds=[] efds=[] to=0.018231 select=0 rfds=[] wfds=[] efds=[] +0.017752 select max=5 rfds=[4] wfds=[] efds=[] to=0.000479 @@ -290,12 +293,15 @@ 64647204 61727061 00000f00 01. sendto=45 +0.001184 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31260100 00010000 00000000 03313730 02393903 32313903 31393407 696e2d61 64647204 61727061 00001000 01. sendto=45 - +0.001061 - select max=5 rfds=[4] wfds=[] efds=[] to=0.009461 + +0.001060 + select max=5 rfds=[4] wfds=[] efds=[] to=0.008400 select=0 rfds=[] wfds=[] efds=[] +0.007976 select max=5 rfds=[4] wfds=[] efds=[] to=0.000424 @@ -306,12 +312,15 @@ 64647204 61727061 00001100 01. sendto=45 +0.001097 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31280100 00010000 00000000 03313730 02393903 32313903 31393407 696e2d61 64647204 61727061 00000100 01. sendto=45 - +0.000765 - select max=5 rfds=[4] wfds=[] efds=[] to=0.009230 + +0.000764 + select max=5 rfds=[4] wfds=[] efds=[] to=0.008465 select=0 rfds=[] wfds=[] efds=[] +0.008502 sendto fd=4 addr=172.18.45.6:53 @@ -421,12 +430,15 @@ 64647204 61727061 00000100 01. sendto=45 +0.000740 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31290100 00010000 00000000 03313730 02393903 32313903 31393407 696e2d61 64647204 61727061 00000200 01. sendto=45 - +0.000707 - select max=5 rfds=[4] wfds=[] efds=[] to=0.038447 + +0.000706 + select max=5 rfds=[4] wfds=[] efds=[] to=0.037740 select=0 rfds=[] wfds=[] efds=[] +0.037284 select max=5 rfds=[4] wfds=[] efds=[] to=0.000456 Index: adns/regress/case-lockup.out diff -u /dev/null adns/regress/case-lockup.out:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-lockup.out Sun May 7 16:30:18 2000 @@ -0,0 +1,4 @@ +adns debug: using nameserver 172.18.45.36 +chiark.greenend.org.uk flags 0 type 1 A(-) submitted +chiark.greenend.org.uk flags 0 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 +rc=0 Index: adns/regress/case-lockup.sys diff -u /dev/null adns/regress/case-lockup.sys:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-lockup.sys Sun May 7 16:30:18 2000 @@ -0,0 +1,135 @@ +noserver +:1 chiark.greenend.org.uk + start 912889153.349504 + socket type=SOCK_DGRAM + socket=4 + +0.000193 + fcntl fd=4 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000088 + fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000072 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000617 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999383 + select=0 rfds=[] wfds=[] efds=[] + +2.008683 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000406 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999594 + select=0 rfds=[] wfds=[] efds=[] + +2.009544 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000428 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999572 + select=0 rfds=[] wfds=[] efds=[] + +2.009567 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000449 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999551 + select=0 rfds=[] wfds=[] efds=[] + +2.009551 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000381 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999619 + select=0 rfds=[] wfds=[] efds=[] + +2.009614 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000383 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999617 + select=0 rfds=[] wfds=[] efds=[] + +2.009622 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000387 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999613 + select=0 rfds=[] wfds=[] efds=[] + +2.009603 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000404 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999596 + select=0 rfds=[] wfds=[] efds=[] + +2.009607 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000468 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999532 + select=0 rfds=[] wfds=[] efds=[] + +2.009526 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000431 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999569 + select=0 rfds=[] wfds=[] efds=[] + +2.009564 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000429 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999571 + select=0 rfds=[] wfds=[] efds=[] + +2.009586 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000479 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999521 + select=0 rfds=[] wfds=[] efds=[] + +2.009511 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000430 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999570 + select=0 rfds=[] wfds=[] efds=[] + +2.009571 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000440 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999560 + select=0 rfds=[] wfds=[] efds=[] + +2.009564 + sendto fd=4 addr=172.18.45.36:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +2.000439 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 + close fd=4 + close=OK + +0.000267 Index: adns/regress/case-manyptrwrongrst.sys diff -u adns/regress/case-manyptrwrongrst.sys:1.3 adns/regress/case-manyptrwrongrst.sys:1.4 --- adns/regress/case-manyptrwrongrst.sys:1.3 Sat Oct 16 20:04:07 1999 +++ adns/regress/case-manyptrwrongrst.sys Sun May 7 16:30:18 2000 @@ -205,54 +205,60 @@ 72046172 70610000 110001. sendto=43 +0.002868 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31290100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 72046172 70610000 020001. sendto=43 - +0.002428 - select max=5 rfds=[4] wfds=[] efds=[] to=0.000824 - select=1 rfds=[4] wfds=[] efds=[] + +0.002427 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] +0.004373 sendto fd=4 addr=172.18.45.6:53 312a0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 72046172 70610000 0c0001. sendto=43 - +0.002426 + +0.002425 sendto fd=4 addr=172.18.45.6:53 312b0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 72046172 70610000 0f0001. sendto=43 +0.002419 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=1 rfds=[4] wfds=[] efds=[] + +0.005328 + sendto fd=4 addr=172.18.45.6:53 + 312c0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 + 72046172 70610000 060001. + sendto=43 + +0.002641 + sendto fd=4 addr=172.18.45.6:53 + 312d0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 + 72046172 70610000 110001. + sendto=43 + +0.000001 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 31298180 00010000 00010000 03323534 01300239 39033230 3307696e 2d616464 72046172 70610000 02000101 30023939 03323033 07696e2d 61646472 04617270 61000006 00010000 0258002e 026e7308 73656375 72697479 02636f02 6e7a0004 726f6f74 c04c7727 714c0000 2a300000 0e100009 3a800001 5180. - +0.001124 + +0.000001 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 31298180 00010000 00010000 03323534 01300239 39033230 3307696e 2d616464 72046172 70610000 02000101 30023939 03323033 07696e2d 61646472 04617270 61000006 00010000 0258002e 026e7308 73656375 72697479 02636f02 6e7a0004 726f6f74 c04c7727 714c0000 2a300000 0e100009 3a800001 5180. - +0.003807 + +0.000001 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000397 - sendto fd=4 addr=172.18.45.6:53 - 312c0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 - 72046172 70610000 060001. - sendto=43 - +0.002641 - sendto fd=4 addr=172.18.45.6:53 - 312d0100 00010000 00000000 03323534 01300239 39033230 3307696e 2d616464 - 72046172 70610000 110001. - sendto=43 - +0.002667 - select max=5 rfds=[4] wfds=[] efds=[] to=1.970184 + +0.002664 + select max=5 rfds=[4] wfds=[] efds=[] to=1.964877 select=1 rfds=[4] wfds=[] efds=[] - +0.003668 + +0.003669 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 312b8180 00010000 00010000 03323534 01300239 39033230 3307696e 2d616464 Index: adns/regress/case-norecurse2.sys diff -u adns/regress/case-norecurse2.sys:1.5 adns/regress/case-norecurse2.sys:1.6 --- adns/regress/case-norecurse2.sys:1.5 Sat Oct 16 20:04:07 1999 +++ adns/regress/case-norecurse2.sys Sun May 7 16:30:18 2000 @@ -231,12 +231,15 @@ 72046172 70610000 020001. sendto=43 +0.000484 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31210100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 050001. sendto=43 - +0.000485 - select max=5 rfds=[4] wfds=[] efds=[] to=0.002425 + +0.000484 + select max=5 rfds=[4] wfds=[] efds=[] to=0.001940 select=1 rfds=[4] wfds=[] efds=[] +0.000119 recvfrom fd=4 buflen=512 *addrlen=16 @@ -277,7 +280,7 @@ 312c0100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 060001. sendto=43 - +0.000488 + +0.000489 select max=5 rfds=[4] wfds=[] efds=[] to=1.980098 select=1 rfds=[4] wfds=[] efds=[] +0.000131 @@ -300,17 +303,20 @@ 72046172 70610000 050001. sendto=43 +0.000505 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31230100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 0c0001. sendto=43 - +0.000530 + +0.000529 sendto fd=4 addr=172.18.45.6:53 31270100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 110001. sendto=43 +0.000468 - select max=5 rfds=[4] wfds=[] efds=[] to=0.009497 + select max=5 rfds=[4] wfds=[] efds=[] to=0.008498 select=0 rfds=[] wfds=[] efds=[] +0.008500 sendto fd=4 addr=172.18.45.6:53 @@ -326,17 +332,20 @@ 72046172 70610000 050001. sendto=43 +0.000537 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31230100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 0c0001. sendto=43 - +0.000485 + +0.000484 sendto fd=4 addr=172.18.45.6:53 31270100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 110001. sendto=43 +0.000487 - select max=5 rfds=[4] wfds=[] efds=[] to=0.009450 + select max=5 rfds=[4] wfds=[] efds=[] to=0.008478 select=0 rfds=[] wfds=[] efds=[] +0.008478 select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 @@ -355,17 +364,20 @@ 72046172 70610000 050001. sendto=43 +0.000612 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31230100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 0c0001. sendto=43 - +0.000552 + +0.000551 sendto fd=4 addr=172.18.45.6:53 31270100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 110001. sendto=43 +0.000564 - select max=5 rfds=[4] wfds=[] efds=[] to=0.009474 + select max=5 rfds=[4] wfds=[] efds=[] to=0.008358 select=0 rfds=[] wfds=[] efds=[] +0.008252 select max=5 rfds=[4] wfds=[] efds=[] to=0.000106 Index: adns/regress/case-norecurse3.sys diff -u adns/regress/case-norecurse3.sys:1.4 adns/regress/case-norecurse3.sys:1.5 --- adns/regress/case-norecurse3.sys:1.4 Tue Oct 12 22:38:23 1999 +++ adns/regress/case-norecurse3.sys Sun May 7 16:30:18 2000 @@ -151,19 +151,25 @@ 64720561 72706131 00000500 01. sendto=45 +0.000438 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31220100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000600 01. sendto=45 - +0.000483 - select max=5 rfds=[4] wfds=[] efds=[] to=0.000057 + +0.000482 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 select=0 rfds=[] wfds=[] efds=[] - +0.008066 + +0.000001 sendto fd=4 addr=172.18.45.6:53 31230100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000c00 01. sendto=45 - +0.000453 + +0.000001 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000861 + select=0 rfds=[] wfds=[] efds=[] + +0.008517 sendto fd=4 addr=172.18.45.6:53 31240100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000d00 01. @@ -194,11 +200,14 @@ 64720561 72706131 00000200 01. sendto=45 +0.000829 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 312a0100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000c00 01. sendto=45 - +0.000488 + +0.000487 sendto fd=4 addr=172.18.45.6:53 312b0100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000f00 01. @@ -209,17 +218,17 @@ 64720561 72706131 00000600 01. sendto=45 +0.000430 - select max=5 rfds=[4] wfds=[] efds=[] to=0.001297 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 select=0 rfds=[] wfds=[] efds=[] - +0.005148 + +0.000001 sendto fd=4 addr=172.18.45.6:53 312d0100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00001100 01. sendto=45 - +0.000447 - select max=5 rfds=[4] wfds=[] efds=[] to=1.979550 + +0.000001 + select max=5 rfds=[4] wfds=[] efds=[] to=1.985143 select=0 rfds=[] wfds=[] efds=[] - +2.-20428 + +1.985166 sendto fd=4 addr=172.18.45.6:53 311f0100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000100 01. @@ -235,14 +244,14 @@ 64720561 72706131 00000500 01. sendto=45 +0.000455 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31220100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000600 01. sendto=45 - +0.000483 - select max=5 rfds=[4] wfds=[] efds=[] to=0.008522 - select=0 rfds=[] wfds=[] efds=[] - +0.008039 + +0.000482 select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 select=0 rfds=[] wfds=[] efds=[] +0.000145 @@ -251,6 +260,9 @@ 64720561 72706131 00000c00 01. sendto=45 +0.000448 + select max=5 rfds=[4] wfds=[] efds=[] to=0.007898 + select=0 rfds=[] wfds=[] efds=[] + +0.008039 sendto fd=4 addr=172.18.45.6:53 31240100 00010000 00000000 01320332 30330331 35360331 39350769 6e2d6164 64720561 72706131 00000d00 01. Index: adns/regress/case-rootqueryall.sys diff -u adns/regress/case-rootqueryall.sys:1.3 adns/regress/case-rootqueryall.sys:1.4 --- adns/regress/case-rootqueryall.sys:1.3 Wed Jul 14 23:45:06 1999 +++ adns/regress/case-rootqueryall.sys Sun May 7 16:30:19 2000 @@ -377,10 +377,13 @@ 31300100 00010000 00000000 00000500 01. sendto=17 +0.000710 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31320100 00010000 00000000 00000c00 01. sendto=17 - +0.000724 + +0.000723 sendto fd=4 addr=172.18.45.6:53 31330100 00010000 00000000 00000d00 01. sendto=17 @@ -413,7 +416,7 @@ 313c0100 00010000 00000000 00001100 01. sendto=17 +0.000681 - select max=5 rfds=[4] wfds=[] efds=[] to=1.989843 + select max=5 rfds=[4] wfds=[] efds=[] to=1.983502 select=0 rfds=[] wfds=[] efds=[] +2.-06971 sendto fd=4 addr=172.18.45.6:53 @@ -468,10 +471,13 @@ 31300100 00010000 00000000 00000500 01. sendto=17 +0.000709 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31320100 00010000 00000000 00000c00 01. sendto=17 - +0.000721 + +0.000720 sendto fd=4 addr=172.18.45.6:53 31330100 00010000 00000000 00000d00 01. sendto=17 @@ -504,7 +510,7 @@ 313c0100 00010000 00000000 00001100 01. sendto=17 +0.000682 - select max=5 rfds=[4] wfds=[] efds=[] to=1.989780 + select max=5 rfds=[4] wfds=[] efds=[] to=1.983562 select=0 rfds=[] wfds=[] efds=[] +2.-06911 sendto fd=4 addr=172.18.45.6:53 @@ -559,10 +565,13 @@ 31300100 00010000 00000000 00000500 01. sendto=17 +0.000689 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=0 rfds=[] wfds=[] efds=[] + +0.000001 sendto fd=4 addr=172.18.45.6:53 31320100 00010000 00000000 00000c00 01. sendto=17 - +0.000743 + +0.000742 sendto fd=4 addr=172.18.45.6:53 31330100 00010000 00000000 00000d00 01. sendto=17 @@ -595,7 +604,7 @@ 313c0100 00010000 00000000 00001100 01. sendto=17 +0.000678 - select max=5 rfds=[4] wfds=[] efds=[] to=1.990318 + select max=5 rfds=[4] wfds=[] efds=[] to=1.981795 select=1 rfds=[4] wfds=[] efds=[] +0.010527 recvfrom fd=4 buflen=512 *addrlen=16 @@ -870,7 +879,7 @@ +0.000584 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000123 + +0.000124 select max=5 rfds=[4] wfds=[] efds=[] to=0.361302 select=1 rfds=[4] wfds=[] efds=[] +0.029558 Index: adns/regress/case-tcpbreakin.out diff -u /dev/null adns/regress/case-tcpbreakin.out:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-tcpbreakin.out Sun May 7 18:26:06 2000 @@ -0,0 +1,8 @@ +adns debug: using nameserver 172.18.45.6 +6.45.18.172.in-addr.arpa flags 2 type 65548 PTR(checked) submitted +adns debug: TCP connected (NS=172.18.45.6) +adns warning: TCP connection failed: write: Broken pipe (NS=172.18.45.6) +adns debug: TCP connected (NS=172.18.45.6) +6.45.18.172.in-addr.arpa flags 2 type PTR(checked): OK; nrrs=1; cname=$; owner=$; ttl=86400 + davenant.relativity.greenend.org.uk +rc=0 Index: adns/regress/case-tcpbreakin.sys diff -u /dev/null adns/regress/case-tcpbreakin.sys:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-tcpbreakin.sys Sun May 7 18:26:06 2000 @@ -0,0 +1,114 @@ +default +:65548 2/6.45.18.172.in-addr.arpa + start 957718868.938329 + socket type=SOCK_DGRAM + socket=4 + +0.000161 + fcntl fd=4 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000059 + fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000038 + socket type=SOCK_STREAM + socket=5 + +0.001056 + fcntl fd=5 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000238 + fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000055 + connect fd=5 addr=172.18.45.6:53 + connect=EINPROGRESS + +0.000723 + select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 + select=1 rfds=[] wfds=[5] efds=[] + +0.000536 + read fd=5 buflen=1 + read=EAGAIN + +0.000118 + write fd=5 + 002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164 + 64720461 72706100 000c0001. + write=44 + +0.001433 + select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.995841 + select=1 rfds=[5] wfds=[] efds=[] + +0.000260 + read fd=5 buflen=2 + read=OK + 00d7. + +0.000302 + read fd=5 buflen=215 + read=OK + 311f8580 00010001 00030003 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a + 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 + 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 + 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc05b00 02000100 01518000 + 06036e73 32c03fc0 7d000100 01000151 800004ac 122d06c0 8f000100 01000151 + 800004ac 122d41c0 a1000100 01000151 800004ac 122d01. + +0.001364 + sendto fd=4 addr=172.18.45.6:53 + 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=EMSGSIZE + +0.000001 + write fd=5 + 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 + 74790867 7265656e 656e6403 6f726702 756b0000 010001. + write=EPIPE + +0.001233 + close fd=5 + close=OK + +0.000001 + select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 + select=1 rfds=[] wfds=[] efds=[] + +0.000118 + socket type=SOCK_STREAM + socket=5 + +0.001056 + fcntl fd=5 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000238 + fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000055 + connect fd=5 addr=172.18.45.6:53 + connect=EINPROGRESS + +0.000723 + select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 + select=1 rfds=[] wfds=[5] efds=[] + +0.000536 + read fd=5 buflen=1 + read=EAGAIN + +0.000723 + write fd=5 + 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 + 74790867 7265656e 656e6403 6f726702 756b0000 010001. + write=44 + +0.000001 + select max=6 rfds=[4,5] wfds=[5] efds=[5] to=29.993649 + select=1 rfds=[5] wfds=[] efds=[] + +0.000260 + read fd=5 buflen=217 + read=OK + 00c5 + 31208580 00010001 00030003 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 45000200 01000151 80000603 6e7332c0 45c06b00 01000100 01518000 + 04ac122d 06c07d00 01000100 01518000 04ac122d 41c08f00 01000100 01518000 + 04ac122d 01. + +0.001171 + read fd=5 buflen=217 + read=EAGAIN + +0.000189 + close fd=4 + close=OK + +0.000352 + close fd=5 + close=OK + +0.000507 Index: adns/regress/case-tcpptr.out diff -u /dev/null adns/regress/case-tcpptr.out:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-tcpptr.out Sun May 7 18:26:06 2000 @@ -0,0 +1,6 @@ +adns debug: using nameserver 172.18.45.6 +6.45.18.172.in-addr.arpa flags 2 type 65548 PTR(checked) submitted +adns debug: TCP connected (NS=172.18.45.6) +6.45.18.172.in-addr.arpa flags 2 type PTR(checked): OK; nrrs=1; cname=$; owner=$; ttl=86400 + davenant.relativity.greenend.org.uk +rc=0 Index: adns/regress/case-tcpptr.sys diff -u /dev/null adns/regress/case-tcpptr.sys:1.1 --- /dev/null Sun May 7 23:39:35 2000 +++ adns/regress/case-tcpptr.sys Sun May 7 18:26:06 2000 @@ -0,0 +1,88 @@ +default +:65548 2/6.45.18.172.in-addr.arpa + start 957718868.938329 + socket type=SOCK_DGRAM + socket=4 + +0.000161 + fcntl fd=4 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000059 + fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000038 + socket type=SOCK_STREAM + socket=5 + +0.001056 + fcntl fd=5 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000238 + fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000055 + connect fd=5 addr=172.18.45.6:53 + connect=EINPROGRESS + +0.000723 + select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 + select=1 rfds=[] wfds=[5] efds=[] + +0.000536 + read fd=5 buflen=1 + read=EAGAIN + +0.000118 + write fd=5 + 002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164 + 64720461 72706100 000c0001. + write=44 + +0.001433 + select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.995841 + select=1 rfds=[5] wfds=[] efds=[] + +0.000260 + read fd=5 buflen=2 + read=OK + 00d7. + +0.000302 + read fd=5 buflen=215 + read=OK + 311f8580 00010001 00030003 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a + 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 + 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 + 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc05b00 02000100 01518000 + 06036e73 32c03fc0 7d000100 01000151 800004ac 122d06c0 8f000100 01000151 + 800004ac 122d41c0 a1000100 01000151 800004ac 122d01. + +0.001364 + sendto fd=4 addr=172.18.45.6:53 + 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=EMSGSIZE + +0.000001 + write fd=5 + 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 + 74790867 7265656e 656e6403 6f726702 756b0000 010001. + write=53 + +0.001233 + read fd=5 buflen=217 + read=EAGAIN + +0.000100 + select max=6 rfds=[4,5] wfds=[5] efds=[5] to=29.997000 + select=1 rfds=[5] wfds=[] efds=[] + +0.000118 + read fd=5 buflen=217 + read=OK + 00c5 + 31208580 00010001 00030003 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 45000200 01000151 80000603 6e7332c0 45c06b00 01000100 01518000 + 04ac122d 06c07d00 01000100 01518000 04ac122d 41c08f00 01000100 01518000 + 04ac122d 01. + +0.001171 + read fd=5 buflen=217 + read=EAGAIN + +0.000189 + close fd=4 + close=OK + +0.000352 + close fd=5 + close=OK + +0.000507 Index: adns/regress/checkall diff -u adns/regress/checkall:1.4 adns/regress/checkall:1.5 --- adns/regress/checkall:1.4 Sun Aug 15 16:09:28 1999 +++ adns/regress/checkall Sun May 7 23:37:18 2000 @@ -1,4 +1,27 @@ #!/bin/sh +# usage: checkall +# runs all test cases +# +# This file is +# Copyright (C) 1998-2000 Ian Jackson +# +# It is part of adns, which is +# Copyright (C) 1997-2000 Ian Jackson +# Copyright (C) 1999 Tony Finch +# +# This program 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 Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. set -e Index: adns/regress/harness.h.m4 diff -u adns/regress/harness.h.m4:1.8 adns/regress/harness.h.m4:1.9 --- adns/regress/harness.h.m4:1.8 Tue Nov 2 23:40:14 1999 +++ adns/regress/harness.h.m4 Sun May 7 23:37:18 2000 @@ -6,7 +6,7 @@ m4_dnl Copyright (C) 1997-1999 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify Index: adns/regress/hcommon.c.m4 diff -u adns/regress/hcommon.c.m4:1.12 adns/regress/hcommon.c.m4:1.14 --- adns/regress/hcommon.c.m4:1.12 Tue Nov 2 23:40:14 1999 +++ adns/regress/hcommon.c.m4 Sun May 7 23:37:18 2000 @@ -3,10 +3,10 @@ m4_dnl - routines used for both record and playback m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify @@ -42,6 +42,7 @@ struct timeval currenttime; const struct Terrno Terrnos[]= { + { "EBADF", EBADF }, { "EAGAIN", EAGAIN }, { "EINPROGRESS", EINPROGRESS }, { "EINTR", EINTR }, Index: adns/regress/hmacros.i4 diff -u adns/regress/hmacros.i4:1.6 adns/regress/hmacros.i4:1.7 --- adns/regress/hmacros.i4:1.6 Sun Oct 10 14:16:24 1999 +++ adns/regress/hmacros.i4 Sun May 7 23:37:18 2000 @@ -6,7 +6,7 @@ m4_dnl Copyright (C) 1997-1999 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify Index: adns/regress/hplayback.c.m4 diff -u adns/regress/hplayback.c.m4:1.11 adns/regress/hplayback.c.m4:1.13 --- adns/regress/hplayback.c.m4:1.11 Tue Nov 2 23:40:14 1999 +++ adns/regress/hplayback.c.m4 Sun May 7 23:37:18 2000 @@ -3,10 +3,10 @@ m4_dnl - playback routines m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify @@ -78,6 +78,7 @@ fd= atoi(fdstr); Tinputfile= fdopen(fd,"r"); if (!Tinputfile) Tfailed("fdopen ADNS_TEST_IN_FD"); } + setvbuf(Tinputfile,0,_IONBF,0); if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); Index: adns/regress/hrecord.c.m4 diff -u adns/regress/hrecord.c.m4:1.11 adns/regress/hrecord.c.m4:1.12 --- adns/regress/hrecord.c.m4:1.11 Tue Nov 2 23:40:14 1999 +++ adns/regress/hrecord.c.m4 Sun May 7 23:37:18 2000 @@ -6,7 +6,7 @@ m4_dnl Copyright (C) 1997-1999 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify Index: adns/regress/hsyscalls.i4 diff -u adns/regress/hsyscalls.i4:1.7 adns/regress/hsyscalls.i4:1.8 --- adns/regress/hsyscalls.i4:1.7 Sun Oct 10 14:16:24 1999 +++ adns/regress/hsyscalls.i4 Sun May 7 23:37:18 2000 @@ -6,7 +6,7 @@ m4_dnl Copyright (C) 1997-1999 Ian Jackson m4_dnl m4_dnl It is part of adns, which is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl Copyright (C) 1999 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify Index: adns/regress/m1test diff -u adns/regress/m1test:1.7 adns/regress/m1test:1.8 --- adns/regress/m1test:1.7 Wed Oct 13 01:27:41 1999 +++ adns/regress/m1test Sun May 7 23:37:18 2000 @@ -1,4 +1,27 @@ #!/bin/sh +# usage: m1test [] ' +# test recording script +# +# This file is +# Copyright (C) 1998-2000 Ian Jackson +# +# It is part of adns, which is +# Copyright (C) 1997-2000 Ian Jackson +# Copyright (C) 1999 Tony Finch +# +# This program 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 Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. set -e Index: adns/regress/r1test diff -u adns/regress/r1test:1.9 adns/regress/r1test:1.11 --- adns/regress/r1test:1.9 Wed Oct 13 01:27:41 1999 +++ adns/regress/r1test Sun May 7 23:37:18 2000 @@ -1,5 +1,27 @@ #!/bin/sh # usage: r1test +# test execution script, for running one test +# +# This file is +# Copyright (C) 1998-2000 Ian Jackson +# +# It is part of adns, which is +# Copyright (C) 1997-2000 Ian Jackson +# Copyright (C) 1999 Tony Finch +# +# This program 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 Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. set -e mrc=1 @@ -42,13 +64,20 @@ then : else - failed=true + failwhy="$failwhy WRONG OUTPUT" fi done -if $failed +cat >"$ocase.leftover" +if egrep . /dev/null "$ocase.leftover" then - echo >&2 "FAILED $case - WRONG OUTPUT - lines of syscall remaining `wc -l`" + failwhy="$failwhy EXITED EARLY" +fi + +if [ "x$failwhy" != x ] +then + scremain="`wc -l <\"$ocase.leftover\"`" + echo >&2 "FAILED $case -$failwhy - lines of syscall remaining $scremain" mrc=2 exit fi Index: adns/src/Makefile.in diff -u adns/src/Makefile.in:1.20 adns/src/Makefile.in:1.21 --- adns/src/Makefile.in:1.20 Sun Oct 10 14:16:24 1999 +++ adns/src/Makefile.in Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/src/adns.h diff -u adns/src/adns.h:1.76 adns/src/adns.h:1.79 --- adns/src/adns.h:1.76 Thu Mar 2 01:34:04 2000 +++ adns/src/adns.h Sun May 7 23:37:18 2000 @@ -8,7 +8,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -39,7 +39,7 @@ * applications where the whole distribution is not GPL'd, are still * likely to be in violation of the GPL. Anyone who wants to do this * should contact Ian Jackson. Please note that to avoid encouraging - * people to infringe the GPL as it applies the body of adns, I think + * people to infringe the GPL as it applies the body of adns, Ian thinks * that if you take advantage of the special exception to redistribute * just adns.h under the LGPL, you should retain this paragraph in its * place in the appropriate copyright statements. @@ -51,7 +51,7 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * - * $Id: adns.h,v 1.76 2000/03/02 01:34:04 ian Exp $ + * $Id: adns.h,v 1.79 2000/05/07 22:37:18 ian Exp $ */ #ifndef ADNS_H_INCLUDED @@ -663,9 +663,10 @@ * for adns_firsttimeout. readfds, writefds, exceptfds and maxfd_io may * not be 0. * - * If *now is not 0 then this will never actually do any I/O, or - * change the fds that adns is using or the timeouts it wants. In any - * case it won't block. + * If now is not 0 then this will never actually do any I/O, or change + * the fds that adns is using or the timeouts it wants. In any case + * it won't block, and it will set the timeout to zero if a query + * finishes in _beforeselect. */ void adns_afterselect(adns_state ads, int maxfd, const fd_set *readfds, @@ -810,9 +811,9 @@ * hostname, as usual, followed by the adns_status value, as an * abbreviation, and then a descriptive string (encoded as if it were * a piece of text), for the address lookup, followed by zero or more - * addresses enclosed in ( and ). If the result was a permanent + * addresses enclosed in ( and ). If the result was a temporary * failure, then a single ? appears instead of the ( ). If the - * result was a temporary failure then an empty pair of parentheses + * result was a permanent failure then an empty pair of parentheses * appears (which a space in between). For example, one of the NS * records for greenend.org.uk comes out like * ns.chiark.greenend.org.uk ok "OK" ( INET 195.224.76.132 ) Index: adns/src/adns.make diff -u adns/src/adns.make:1.5 adns/src/adns.make:1.6 --- adns/src/adns.make:1.5 Sun Oct 10 14:16:24 1999 +++ adns/src/adns.make Sun May 7 23:37:18 2000 @@ -4,7 +4,7 @@ # Copyright (C) 1997-1999 Ian Jackson # # It is part of adns, which is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # Copyright (C) 1999 Tony Finch # # This program is free software; you can redistribute it and/or modify Index: adns/src/check.c diff -u adns/src/check.c:1.6 adns/src/check.c:1.7 --- adns/src/check.c:1.6 Sat Oct 16 20:11:02 1999 +++ adns/src/check.c Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/dlist.h diff -u adns/src/dlist.h:1.1 adns/src/dlist.h:1.2 --- adns/src/dlist.h:1.1 Tue Oct 12 20:51:08 1999 +++ adns/src/dlist.h Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/event.c diff -u adns/src/event.c:1.44 adns/src/event.c:1.52 --- adns/src/event.c:1.44 Sun Nov 7 16:06:48 1999 +++ adns/src/event.c Sun May 7 23:37:18 2000 @@ -6,10 +6,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -143,6 +143,17 @@ return; } +static void inter_immed(struct timeval **tv_io, struct timeval *tvbuf) { + struct timeval *rbuf; + + if (!tv_io) return; + + rbuf= *tv_io; + if (!rbuf) { *tv_io= rbuf= tvbuf; } + + timerclear(rbuf); +} + static void inter_maxto(struct timeval **tv_io, struct timeval *tvbuf, struct timeval maxto) { struct timeval *rbuf; @@ -185,12 +196,7 @@ if (!timercmp(&now,&qu->timeout,>)) { inter_maxtoabs(tv_io,tvbuf,now,qu->timeout); } else { - if (!act) { - tvbuf->tv_sec= 0; - tvbuf->tv_usec= 0; - *tv_io= tvbuf; - return; - } + if (!act) { inter_immed(tv_io,tvbuf); return; } LIST_UNLINK(*queue,qu); if (qu->state != query_tosend) { adns__query_fail(qu,adns_s_timeout); @@ -210,6 +216,7 @@ for (;;) { switch (ads->tcpstate) { case server_broken: + if (!act) { inter_immed(tv_io,tvbuf); return; } for (qu= ads->tcpw.head; qu; qu= nqu) { nqu= qu->next; assert(qu->state == query_tcpw); @@ -221,6 +228,7 @@ ads->tcpstate= server_disconnected; case server_disconnected: /* fall through */ if (!ads->tcpw.head) return; + if (!act) { inter_immed(tv_io,tvbuf); return; } adns__tcp_tryconnect(ads,now); break; case server_ok: @@ -231,7 +239,7 @@ timevaladd(&ads->tcptimeout,TCPIDLEMS); } case server_connecting: /* fall through */ - if (!timercmp(&now,&ads->tcptimeout,>)) { + if (!act || !timercmp(&now,&ads->tcptimeout,>)) { inter_maxtoabs(tv_io,tvbuf,now,ads->tcptimeout); return; } { @@ -253,6 +261,7 @@ abort(); } } + return; } void adns__timeouts(adns_state ads, int act, @@ -295,6 +304,7 @@ switch (ads->tcpstate) { case server_disconnected: + case server_broken: return 1; case server_connecting: pollfds_buf[1].events= POLLOUT; @@ -323,7 +333,7 @@ case server_ok: if (fd != ads->tcpsocket) break; assert(!ads->tcprecv_skip); - for (;;) { + do { if (ads->tcprecv.used >= ads->tcprecv_skip+2) { dgramlen= ((ads->tcprecv.buf[ads->tcprecv_skip]<<8) | ads->tcprecv.buf[ads->tcprecv_skip+1]); @@ -357,9 +367,9 @@ if (errno_resources(errno)) { r= errno; goto xit; } } adns__tcp_broken(ads,"read",r?strerror(errno):"closed"); - r= 0; goto xit; } - } /* never reached */ + } while (ads->tcpstate == server_ok); + r= 0; goto xit; default: abort(); } @@ -531,8 +541,8 @@ if (tv_mod && (!*tv_mod || (*tv_mod)->tv_sec || (*tv_mod)->tv_usec)) { /* The caller is planning to sleep. */ adns__must_gettimeofday(ads,&now,&tv_nowbuf); - if (!now) goto xit; - adns__timeouts(ads, 1, tv_mod,tv_tobuf, *now); + if (!now) { inter_immed(tv_mod,tv_tobuf); goto xit; } + adns__timeouts(ads, 0, tv_mod,tv_tobuf, *now); } npollfds= adns__pollfds(ads,pollfds); @@ -665,6 +675,7 @@ maxfd= 0; tvp= 0; FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); adns_beforeselect(ads,&maxfd,&readfds,&writefds,&exceptfds,&tvp,&tvbuf,0); + assert(tvp); rsel= select(maxfd,&readfds,&writefds,&exceptfds,tvp); if (rsel==-1) { if (errno == EINTR) { Index: adns/src/general.c diff -u adns/src/general.c:1.26 adns/src/general.c:1.27 --- adns/src/general.c:1.26 Wed Mar 1 23:50:05 2000 +++ adns/src/general.c Sun May 7 23:37:18 2000 @@ -5,10 +5,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/internal.h diff -u adns/src/internal.h:1.56 adns/src/internal.h:1.60 --- adns/src/internal.h:1.56 Thu Mar 2 01:45:37 2000 +++ adns/src/internal.h Sun May 7 23:37:18 2000 @@ -6,10 +6,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -289,10 +289,10 @@ server_ok, server_broken } tcpstate; struct timeval tcptimeout; - /* This will have tv_sec==0 if it is not valid. - * It will always be valid if tcpstate _connecting. - * When _ok, it will be nonzero if we are idle - * (ie, tcpw queue is empty) and counting down. + /* This will have tv_sec==0 if it is not valid. It will always be + * valid if tcpstate _connecting. When _ok, it will be nonzero if + * we are idle (ie, tcpw queue is empty), in which case it is the + * absolute time when we will close the connection. */ struct sigaction stdsigpipe; sigset_t stdsigmask; Index: adns/src/parse.c diff -u adns/src/parse.c:1.18 adns/src/parse.c:1.19 --- adns/src/parse.c:1.18 Thu Mar 2 00:58:07 2000 +++ adns/src/parse.c Sun May 7 23:37:18 2000 @@ -4,10 +4,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/poll.c diff -u adns/src/poll.c:1.7 adns/src/poll.c:1.8 --- adns/src/poll.c:1.7 Tue Oct 12 23:55:15 1999 +++ adns/src/poll.c Sun May 7 23:37:18 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/query.c diff -u adns/src/query.c:1.55 adns/src/query.c:1.59 --- adns/src/query.c:1.55 Thu Mar 2 01:34:04 2000 +++ adns/src/query.c Sun May 7 23:37:18 2000 @@ -6,10 +6,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -66,7 +66,7 @@ adns__vbuf_init(&qu->search_vb); qu->search_origlen= qu->search_pos= qu->search_doneabs= 0; - qu->id= 0; + qu->id= -2; /* will be overwritten with real id before we leave adns */ qu->flags= flags; qu->retries= 0; qu->udpnextserver= 0; Index: adns/src/reply.c diff -u adns/src/reply.c:1.36 adns/src/reply.c:1.39 --- adns/src/reply.c:1.36 Thu Mar 2 00:58:07 2000 +++ adns/src/reply.c Sun May 7 23:37:18 2000 @@ -4,10 +4,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify @@ -119,7 +119,7 @@ return; case rcode_servfail: if (qu) adns__query_fail(qu,adns_s_rcodeservfail); - else adns__warn(ads,serv,qu,"server failure on unidentifiable query"); + else adns__debug(ads,serv,qu,"server failure on unidentifiable query"); return; case rcode_notimp: adns__warn(ads,serv,qu,"server claims not to implement our query"); @@ -280,14 +280,14 @@ if (cname_here) goto x_restartquery; /* Bloody hell, I thought we asked for recursion ? */ - if (flg_rd) { - adns__diag(ads,serv,qu,"server thinks we didn't ask for recursive lookup"); - } if (!flg_ra) { adns__diag(ads,serv,qu,"server is not willing to do recursive lookups for us"); adns__query_fail(qu,adns_s_norecurse); } else { - adns__diag(ads,serv,qu,"server claims to do recursion, but gave us a referral"); + if (!flg_rd) + adns__diag(ads,serv,qu,"server thinks we didn't ask for recursive lookup"); + else + adns__diag(ads,serv,qu,"server claims to do recursion, but gave us a referral"); adns__query_fail(qu,adns_s_invalidresponse); } return; Index: adns/src/setup.c diff -u adns/src/setup.c:1.35 adns/src/setup.c:1.38 --- adns/src/setup.c:1.35 Sun Nov 7 19:15:36 1999 +++ adns/src/setup.c Sun May 7 23:37:18 2000 @@ -8,7 +8,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/transmit.c diff -u adns/src/transmit.c:1.19 adns/src/transmit.c:1.20 --- adns/src/transmit.c:1.19 Thu Mar 2 01:45:37 2000 +++ adns/src/transmit.c Sun May 7 23:37:18 2000 @@ -5,10 +5,10 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/tvarith.h diff -u adns/src/tvarith.h:1.2 adns/src/tvarith.h:1.3 --- adns/src/tvarith.h:1.2 Sun Nov 7 19:02:20 1999 +++ adns/src/tvarith.h Sun May 7 23:37:19 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify Index: adns/src/types.c diff -u adns/src/types.c:1.35 adns/src/types.c:1.36 --- adns/src/types.c:1.35 Wed Oct 13 01:23:01 1999 +++ adns/src/types.c Sun May 7 23:37:19 2000 @@ -7,7 +7,7 @@ * Copyright (C) 1997-1999 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * Copyright (C) 1999 Tony Finch * * This program is free software; you can redistribute it and/or modify