]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4017. [testing] Add system test to check lookups to legacy servers
authorMark Andrews <marka@isc.org>
Wed, 3 Dec 2014 20:01:52 +0000 (07:01 +1100)
committerMark Andrews <marka@isc.org>
Wed, 3 Dec 2014 20:01:52 +0000 (07:01 +1100)
                        with broken DNS behaviour. [RT #37965]

36 files changed:
CHANGES
bin/named/include/named/globals.h
bin/named/interfacemgr.c
bin/named/main.c
bin/tests/system/conf.sh.in
bin/tests/system/legacy/clean.sh [new file with mode: 0644]
bin/tests/system/legacy/ns1/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns1/root.db [new file with mode: 0644]
bin/tests/system/legacy/ns2/dropedns.db [new file with mode: 0644]
bin/tests/system/legacy/ns2/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns2/named.dropedns [new file with mode: 0644]
bin/tests/system/legacy/ns3/dropedns-notcp.db [new file with mode: 0644]
bin/tests/system/legacy/ns3/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns3/named.dropedns [new file with mode: 0644]
bin/tests/system/legacy/ns3/named.notcp [new file with mode: 0644]
bin/tests/system/legacy/ns4/named.args [new file with mode: 0644]
bin/tests/system/legacy/ns4/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns4/plain.db [new file with mode: 0644]
bin/tests/system/legacy/ns5/named.args [new file with mode: 0644]
bin/tests/system/legacy/ns5/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns5/named.notcp [new file with mode: 0644]
bin/tests/system/legacy/ns5/plain-notcp.db [new file with mode: 0644]
bin/tests/system/legacy/ns6/edns512.db.in [new file with mode: 0644]
bin/tests/system/legacy/ns6/named.args [new file with mode: 0644]
bin/tests/system/legacy/ns6/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns6/sign.sh [new file with mode: 0755]
bin/tests/system/legacy/ns7/edns512-notcp.db.in [new file with mode: 0644]
bin/tests/system/legacy/ns7/named.args [new file with mode: 0644]
bin/tests/system/legacy/ns7/named.conf [new file with mode: 0644]
bin/tests/system/legacy/ns7/named.notcp [new file with mode: 0644]
bin/tests/system/legacy/ns7/sign.sh [new file with mode: 0755]
bin/tests/system/legacy/setup.sh [new file with mode: 0644]
bin/tests/system/legacy/tests.sh [new file with mode: 0755]
bin/tests/system/start.pl
doc/arm/notes.xml
util/merge_copyrights

diff --git a/CHANGES b/CHANGES
index d9d7872468f72c7606f354c01906a9b222d67876..40fd5271aab85da80a41ace324762beeed73c209 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4017.  [testing]       Add system test to check lookups to legacy servers
+                       with broken DNS behaviour. [RT #37965]
+
 4016.  [bug]           Fix a dig segfault due to bad linked list usage.
                        [RT #37591]
 
index e47bda88950573ea69e8e58ac6efba253a796363..dbc0f2a3a7dd01f528dbee730fb617678f79e6b2 100644 (file)
@@ -167,6 +167,7 @@ EXTERN isc_boolean_t                ns_g_nosoa              INIT(ISC_FALSE);
 EXTERN isc_boolean_t           ns_g_noaa               INIT(ISC_FALSE);
 EXTERN unsigned int            ns_g_delay              INIT(0);
 EXTERN isc_boolean_t           ns_g_nonearest          INIT(ISC_FALSE);
+EXTERN isc_boolean_t           ns_g_notcp              INIT(ISC_FALSE);
 EXTERN isc_boolean_t           ns_g_disable6           INIT(ISC_FALSE);
 EXTERN isc_boolean_t           ns_g_disable4           INIT(ISC_FALSE);
 
index 137845e0b50df8089133e2152a1011981db74e1b..914d2994eca95addf0e1817dc2f9f058633feb33 100644 (file)
@@ -567,7 +567,7 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
        if (result != ISC_R_SUCCESS)
                goto cleanup_interface;
 
-       if (accept_tcp == ISC_TRUE) {
+       if (!ns_g_notcp && accept_tcp == ISC_TRUE) {
                result = ns_interface_accepttcp(ifp);
                if (result != ISC_R_SUCCESS) {
                        /*
index 4d26ff5c05003db9dcc68b582d6c61c770db9f5d..9fa77ee48b1dd169e362c167b239eb9c82edd94a 100644 (file)
@@ -561,6 +561,8 @@ parse_command_line(int argc, char *argv[]) {
                        else if (!strncmp(isc_commandline_argument, "dscp=", 5))
                                isc_dscp_check_value =
                                           atoi(isc_commandline_argument + 5);
+                       else if (!strcmp(isc_commandline_argument, "notcp"))
+                               ns_g_notcp = ISC_TRUE;
                        else
                                fprintf(stderr, "unknown -T flag '%s\n",
                                        isc_commandline_argument);
index 16019beff1909641653abaa775898039275f6cad..9015076a3e62a2e2a7bb81da702ae321fb74b5ab 100644 (file)
@@ -66,15 +66,15 @@ RANDFILE=$TOP/bin/tests/system/random.data
 # v6synth
 SUBDIRS="acl additional allow_query addzone autosign builtin
         cacheclean case checkconf @CHECKDS@ checknames checkzone
-        @COVERAGE@ database delv dlv dlvauto dlz dlzexternal
-         dname dns64 dnssec dsdigest dscp ecdsa ednscompliance emptyzones
+        @COVERAGE@ database delv dlv dlvauto dlz dlzexternal dname
+        dns64 dnssec dsdigest dscp ecdsa ednscompliance emptyzones
         filter-aaaa formerr forward geoip glue gost ixfr inline
-        limits logfileconfig lwresd masterfile masterformat metadata
-        notify nslookup nsupdate pending @PKCS11_TEST@ reclimit redirect
-        resolver rndc rpz rrl rrchecker rrsetorder rsabigexponent
-        sit sfcache smartsign sortlist spf staticstub statistics
-        stub tcp tkey tsig tsiggss unknown upforwd verify views wildcard
-        xfer xferquota zero zonechecks"
+        legacy limits logfileconfig lwresd masterfile masterformat
+        metadata notify nslookup nsupdate pending @PKCS11_TEST@
+        reclimit redirect resolver rndc rpz rrl rrchecker rrsetorder
+        rsabigexponent sit sfcache smartsign sortlist spf staticstub
+        statistics stub tcp tkey tsig tsiggss unknown upforwd
+        verify views wildcard xfer xferquota zero zonechecks"
 
 # Use the CONFIG_SHELL detected by configure for tests
 SHELL=@SHELL@
diff --git a/bin/tests/system/legacy/clean.sh b/bin/tests/system/legacy/clean.sh
new file mode 100644 (file)
index 0000000..24fb9be
--- /dev/null
@@ -0,0 +1,11 @@
+rm -f dig.out.*
+rm -f ns?/named.memstats
+rm -f ns?/named.run
+rm -f ns6/K*
+rm -f ns6/dsset-*
+rm -f ns6/edns512.db ns6/edns512.db.signed
+rm -f ns6/signer.err
+rm -f ns7/K*
+rm -f ns7/dsset-*
+rm -f ns7/edns512-notcp.db ns7/edns512-notcp.db.signed
+rm -f ns7/signer.err
diff --git a/bin/tests/system/legacy/ns1/named.conf b/bin/tests/system/legacy/ns1/named.conf
new file mode 100644 (file)
index 0000000..994ed99
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.1;
+       notify-source 10.53.0.1;
+       transfer-source 10.53.0.1;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.1; };
+       listen-on-v6 { none; };
+       recursion yes;
+};
+
+server 10.53.0.7 { edns no; };
+
+zone "." {
+       type master;
+       file "root.db";
+};
+
diff --git a/bin/tests/system/legacy/ns1/root.db b/bin/tests/system/legacy/ns1/root.db
new file mode 100644 (file)
index 0000000..8860443
--- /dev/null
@@ -0,0 +1,16 @@
+$TTL 60
+.                      SOA     ns1.    marka.isc.org 1 0 0 0 0
+.                      NS      ns1.
+ns1.                   A       10.53.0.1
+dropedns.              NS      ns.dropedns.
+ns.dropedns.           A       10.53.0.2
+dropedns-notcp.                NS      ns.dropedns-notcp.
+ns.dropedns-notcp.     A       10.53.0.3
+plain.                 NS      ns.plain.
+ns.plain.              A       10.53.0.4
+plain-notcp.           NS      ns.plain-notcp.
+ns.plain-notcp.                A       10.53.0.5
+edns512.               NS      ns.edns512.
+ns.edns512.            A       10.53.0.6
+edns512-notcp.         NS      ns.edns512-notcp.
+ns.edns512-notcp.      A       10.53.0.7
diff --git a/bin/tests/system/legacy/ns2/dropedns.db b/bin/tests/system/legacy/ns2/dropedns.db
new file mode 100644 (file)
index 0000000..59e0d55
--- /dev/null
@@ -0,0 +1,3 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.2
diff --git a/bin/tests/system/legacy/ns2/named.conf b/bin/tests/system/legacy/ns2/named.conf
new file mode 100644 (file)
index 0000000..e5cebdf
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.2;
+       notify-source 10.53.0.2;
+       transfer-source 10.53.0.2;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.2; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "dropedns" {
+       type master;
+       file "dropedns.db";
+};
diff --git a/bin/tests/system/legacy/ns2/named.dropedns b/bin/tests/system/legacy/ns2/named.dropedns
new file mode 100644 (file)
index 0000000..37dd9cf
--- /dev/null
@@ -0,0 +1 @@
+dropedns
diff --git a/bin/tests/system/legacy/ns3/dropedns-notcp.db b/bin/tests/system/legacy/ns3/dropedns-notcp.db
new file mode 100644 (file)
index 0000000..d7a53f1
--- /dev/null
@@ -0,0 +1,3 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.3
diff --git a/bin/tests/system/legacy/ns3/named.conf b/bin/tests/system/legacy/ns3/named.conf
new file mode 100644 (file)
index 0000000..03d707e
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.3;
+       notify-source 10.53.0.3;
+       transfer-source 10.53.0.3;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.3; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "dropedns-notcp" {
+       type master;
+       file "dropedns-notcp.db";
+};
diff --git a/bin/tests/system/legacy/ns3/named.dropedns b/bin/tests/system/legacy/ns3/named.dropedns
new file mode 100644 (file)
index 0000000..37dd9cf
--- /dev/null
@@ -0,0 +1 @@
+dropedns
diff --git a/bin/tests/system/legacy/ns3/named.notcp b/bin/tests/system/legacy/ns3/named.notcp
new file mode 100644 (file)
index 0000000..e25c3a8
--- /dev/null
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns4/named.args b/bin/tests/system/legacy/ns4/named.args
new file mode 100644 (file)
index 0000000..fb61e96
--- /dev/null
@@ -0,0 +1 @@
+-m record,size,mctx -T clienttest -c named.conf -d 99 -g -U 4 -T noedns
diff --git a/bin/tests/system/legacy/ns4/named.conf b/bin/tests/system/legacy/ns4/named.conf
new file mode 100644 (file)
index 0000000..8a1bbce
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.4;
+       notify-source 10.53.0.4;
+       transfer-source 10.53.0.4;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.4; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "plain" {
+       type master;
+       file "plain.db";
+};
diff --git a/bin/tests/system/legacy/ns4/plain.db b/bin/tests/system/legacy/ns4/plain.db
new file mode 100644 (file)
index 0000000..be1c678
--- /dev/null
@@ -0,0 +1,3 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.4
diff --git a/bin/tests/system/legacy/ns5/named.args b/bin/tests/system/legacy/ns5/named.args
new file mode 100644 (file)
index 0000000..fb61e96
--- /dev/null
@@ -0,0 +1 @@
+-m record,size,mctx -T clienttest -c named.conf -d 99 -g -U 4 -T noedns
diff --git a/bin/tests/system/legacy/ns5/named.conf b/bin/tests/system/legacy/ns5/named.conf
new file mode 100644 (file)
index 0000000..2133938
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.5;
+       notify-source 10.53.0.5;
+       transfer-source 10.53.0.5;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.5; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "plain-notcp" {
+       type master;
+       file "plain-notcp.db";
+};
diff --git a/bin/tests/system/legacy/ns5/named.notcp b/bin/tests/system/legacy/ns5/named.notcp
new file mode 100644 (file)
index 0000000..e25c3a8
--- /dev/null
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns5/plain-notcp.db b/bin/tests/system/legacy/ns5/plain-notcp.db
new file mode 100644 (file)
index 0000000..b84c1c9
--- /dev/null
@@ -0,0 +1,3 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.5
diff --git a/bin/tests/system/legacy/ns6/edns512.db.in b/bin/tests/system/legacy/ns6/edns512.db.in
new file mode 100644 (file)
index 0000000..3ec1880
--- /dev/null
@@ -0,0 +1,15 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.6
+txt500 60      TXT     ( "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789" )
diff --git a/bin/tests/system/legacy/ns6/named.args b/bin/tests/system/legacy/ns6/named.args
new file mode 100644 (file)
index 0000000..0c1b376
--- /dev/null
@@ -0,0 +1 @@
+-m record,size,mctx -T clienttest -c named.conf -d 99 -g -U 4 -T maxudp512
diff --git a/bin/tests/system/legacy/ns6/named.conf b/bin/tests/system/legacy/ns6/named.conf
new file mode 100644 (file)
index 0000000..1f3dfb7
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.6;
+       notify-source 10.53.0.6;
+       transfer-source 10.53.0.6;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.6; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "edns512" {
+       type master;
+       file "edns512.db.signed";
+};
diff --git a/bin/tests/system/legacy/ns6/sign.sh b/bin/tests/system/legacy/ns6/sign.sh
new file mode 100755 (executable)
index 0000000..ce06895
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+SYSTEMTESTTOP=../..
+. $SYSTEMTESTTOP/conf.sh
+
+echo "I:sign edns512"
+
+zone=edns512
+infile=edns512.db.in
+zonefile=edns512.db
+outfile=edns512.db.signed
+
+keyname1=`$KEYGEN -r $RANDFILE -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null` 
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -r $RANDFILE -g -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
diff --git a/bin/tests/system/legacy/ns7/edns512-notcp.db.in b/bin/tests/system/legacy/ns7/edns512-notcp.db.in
new file mode 100644 (file)
index 0000000..d194451
--- /dev/null
@@ -0,0 +1,15 @@
+@      60      SOA     ns marka.isc.org. 1 0 0 0 0
+@      60      NS      ns
+ns     60      A       10.53.0.7
+txt500 60      TXT     ( "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789"
+                       "01234567890123456789012345678901234567890123456789" )
diff --git a/bin/tests/system/legacy/ns7/named.args b/bin/tests/system/legacy/ns7/named.args
new file mode 100644 (file)
index 0000000..0c1b376
--- /dev/null
@@ -0,0 +1 @@
+-m record,size,mctx -T clienttest -c named.conf -d 99 -g -U 4 -T maxudp512
diff --git a/bin/tests/system/legacy/ns7/named.conf b/bin/tests/system/legacy/ns7/named.conf
new file mode 100644 (file)
index 0000000..8cb0818
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { /* empty */ };
+
+options {
+       query-source address 10.53.0.7;
+       notify-source 10.53.0.7;
+       transfer-source 10.53.0.7;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.7; };
+       listen-on-v6 { none; };
+       recursion no;
+};
+
+zone "edns512-notcp" {
+       type master;
+       file "edns512-notcp.db.signed";
+};
diff --git a/bin/tests/system/legacy/ns7/named.notcp b/bin/tests/system/legacy/ns7/named.notcp
new file mode 100644 (file)
index 0000000..e25c3a8
--- /dev/null
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns7/sign.sh b/bin/tests/system/legacy/ns7/sign.sh
new file mode 100755 (executable)
index 0000000..e97657d
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+SYSTEMTESTTOP=../..
+. $SYSTEMTESTTOP/conf.sh
+
+echo "I:sign edns512-notcp"
+
+zone=edns512-notcp
+infile=edns512-notcp.db.in
+zonefile=edns512-notcp.db
+outfile=edns512-notcp.db.signed
+
+keyname1=`$KEYGEN -r $RANDFILE -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null` 
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -r $RANDFILE -g -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
diff --git a/bin/tests/system/legacy/setup.sh b/bin/tests/system/legacy/setup.sh
new file mode 100644 (file)
index 0000000..2e79207
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
+
+$SHELL clean.sh
+
+(cd ns6 && $SHELL -e sign.sh)
+(cd ns7 && $SHELL -e sign.sh)
diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh
new file mode 100755 (executable)
index 0000000..9eefd49
--- /dev/null
@@ -0,0 +1,151 @@
+#!/bin/sh
+#
+# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# $Id$
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+status=0
+n=0
+
+n=`expr $n + 1`
+echo "I:checking drop edns server setup ($n)"
+ret=0
+$DIG +edns @10.53.0.2 -p 5300 dropedns soa > dig.out.1.test$n
+grep "connection timed out; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
+$DIG +noedns @10.53.0.2 -p 5300 dropedns soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+$DIG +noedns +tcp @10.53.0.2 -p 5300 dropedns soa > dig.out.3.test$n || ret=1
+grep "status: NOERROR" dig.out.3.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.3.test$n > /dev/null && ret=1
+$DIG +edns +tcp @10.53.0.2 -p 5300 dropedns soa > dig.out.4.test$n
+grep "connection timed out; no servers could be reached" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to drop edns server succeeds ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 dropedns soa > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking drop edns + no tcp server setup ($n)"
+ret=0
+$DIG +edns @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.1.test$n
+grep "connection timed out; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
+$DIG +noedns +tcp  @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.2.test$n
+grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
+$DIG +noedns @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.3.test$n || ret=1
+grep "status: NOERROR" dig.out.3.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.3.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to drop edns + no tcp server succeeds ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 dropedns-notcp soa > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking plain dns server setup ($n)"
+ret=0
+$DIG +edns @10.53.0.4 -p 5300 plain soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to plain dns server succeeds ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 plain soa > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+n=`expr $n + 1`
+
+n=`expr $n + 1`
+echo "I:checking plain dns + no tcp server setup ($n)"
+ret=0
+$DIG +edns @10.53.0.5 -p 5300 plain-notcp soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG +edns +tcp @10.53.0.5 -p 5300 plain-notcp soa > dig.out.2.test$n
+grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to plain dns + no tcp server succeeds ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 plain-notcp soa > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+n=`expr $n + 1`
+
+echo "I:checking edns 512 server setup ($n)"
+ret=0
+$DIG +edns @10.53.0.6 -p 5300 edns512 soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+$DIG +edns +tcp  @10.53.0.6 -p 5300 edns512 soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+$DIG +edns @10.53.0.6 -p 5300 txt500.edns512 txt > dig.out.3.test$n
+grep "connection timed out; no servers could be reached" dig.out.3.test$n > /dev/null
+$DIG +edns +bufsize=512 +ignor @10.53.0.6 -p 5300 txt500.edns512 txt > dig.out.4.test$n
+grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to edns 512 server succeeds ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 txt500.edns512 txt > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+echo "I:checking edns 512 + no tcp server setup ($n)"
+ret=0
+$DIG +noedns @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+$DIG +noedns +tcp  @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.2.test$n
+grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
+$DIG +edns @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.3.test$n
+grep "connection timed out; no servers could be reached" dig.out.3.test$n > /dev/null
+$DIG +edns +bufsize=512 +ignor @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.4.test$n
+grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+n=`expr $n + 1`
+echo "I:checking recursive lookup to edns 512 + no tcp server succeeds with server { edns no; } ($n)"
+ret=0
+$DIG +tcp  @10.53.0.1 -p 5300 edns512-notcp soa > dig.out.test$n || ret=1
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+echo "I:exit status: $status"
+exit $status
index 8922d4d61998e8d0884d81c94a91eb72bbfb8666..ca09731965c7a82e41484022ef1ca512ec1d27dd 100644 (file)
@@ -186,6 +186,8 @@ sub start_server {
                                if (-e "$testdir/$server/named.maxudp1460");
                        $command .= "-c named.conf -d 99 -g -U 4";
                }
+               $command .= " -T notcp"
+                       if (-e "$testdir/$server/named.notcp");
                if ($restart) {
                        $command .= " >>named.run 2>&1 &";
                } else {
@@ -273,6 +275,7 @@ sub verify_server {
        my $server = shift;
        my $n = $server;
        my $port = 5300;
+       my $tcp = "+tcp";
 
        $n =~ s/^ns//;
 
@@ -286,9 +289,11 @@ sub verify_server {
                close FH;
        }
 
+       $tcp = "" if (-e "$testdir/$server/named.notcp");
+
        my $tries = 0;
        while (1) {
-               my $return = system("$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noedns -p $port version.bind. chaos txt \@10.53.0.$n > dig.out");
+               my $return = system("$DIG $tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noedns -p $port version.bind. chaos txt \@10.53.0.$n > dig.out");
                last if ($return == 0);
                if (++$tries >= 30) {
                        print `grep ";" dig.out > /dev/null`;
index dfc45f26dc913b6a0dca3a7ac0b00d49360d4cdf..75cc456d642b8e48ae488a9487da666413a386b8 100644 (file)
          is not present will now return NOERROR instead of NXDOMAIN.
         </para>
       </listitem>
+      <listitem>
+        <para>
+         Due to an inadvertent removal of code in the previous
+         release, when <command>named</command> encountered an
+         authoritative name server which dropped all EDNS queries,
+         it did not always try plain DNS. This has been corrected.
+         [RT #37965]
+        </para>
+      </listitem>
     </itemizedlist>
   </sect2>
   <sect2 id="end_of_life">
index b18a023d54ec307b1998d8e9aa0b08b6650ab237..201d3f271a5fe22848875a4ba0bdf45960300152 100644 (file)
@@ -118,6 +118,10 @@ while (<CHANGES>) {
            $file_types{$_} = "X";
        } elsif ($base =~ /\/named\.port$/i) {
            $file_types{$_} = "X";
+       } elsif ($base =~ /\/named\.dropedns$/i) {
+           $file_types{$_} = "X";
+       } elsif ($base =~ /\/named\.notcp$/i) {
+           $file_types{$_} = "X";
        } elsif ($base =~ /\/README$/i) {
            $file_types{$_} = "TXT.BRIEF";
        } else {