]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a XoT crash
authorMatthijs Mekking <matthijs@isc.org>
Mon, 15 Mar 2021 14:08:04 +0000 (15:08 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 16 Mar 2021 09:11:12 +0000 (10:11 +0100)
The transport should also be detached when we skip a master, otherwise
named will crash when sending a SOA query to the next master over TLS,
because the transport must be NULL when we enter
'dns_view_gettransport'.

CHANGES
bin/tests/system/doth/example.axfr.good [moved from bin/tests/system/doth/dig1.good with 100% similarity]
bin/tests/system/doth/tests.sh
doc/notes/notes-current.rst
lib/dns/zone.c
util/copyrights

diff --git a/CHANGES b/CHANGES
index c8ae14b0ab1d0e0fafbd5f5c35d2d2b7146c267c..4e7f398cb8fe4788a7b588973b241ae1259c406e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+5599.  [bug]           Fix a crash when transferring a zone over TLS,
+                       after "named" previously skipped a master. [GL #2562]
+
 5598.  [port]          Cast (char) to (unsigned char) when calling ctype
                        tests. [GL #2567]
 
index 0ca31d0d472e6efad2dae5f145428c81200d325c..2bed4e555d3c5547ba0135765312b7c11bdd04b2 100644 (file)
@@ -37,7 +37,7 @@ echo_i "testing XoT server functionality (using dig) ($n)"
 ret=0
 dig_with_tls_opts example. -b 10.53.0.3 @10.53.0.1 axfr > dig.out.ns1.test$n || ret=1
 grep "^;" dig.out.ns1.test$n | cat_i
-digcomp dig1.good dig.out.ns1.test$n || ret=1
+digcomp example.axfr.good dig.out.ns1.test$n || ret=1
 if test $ret != 0 ; then echo_i "failed"; fi
 status=$((status+ret))
 
@@ -46,7 +46,7 @@ echo_i "testing incoming XoT functionality (from secondary) ($n)"
 ret=0
 if retry_quiet 10 wait_for_tls_xfer; then
        grep "^;" "dig.out.ns2.test$n" | cat_i
-       digcomp dig1.good "dig.out.ns2.test$n" || ret=1
+       digcomp example.axfr.good "dig.out.ns2.test$n" || ret=1
 else
        echo_i "timed out waiting for zone transfer"
        ret=1
index 0d291caa6429b3a0d77069cfa99a98d1a424d438..8c388ae75d42089af6329ccf10a99c9f6b32b482 100644 (file)
@@ -82,3 +82,6 @@ Bug Fixes
   ``named-journalprint -d`` (downgrade) or ``named-journalprint -u``
   (upgrade). Note that this *must not* be done while ``named`` is
   running.  [GL #2505]
+
+- Fix a crash when transferring a zone over TLS, after "named" previously
+  skipped a master. [GL #2562]
index e172f064b9ae73024d1e4551b228bf4caff2137b..baa3271c25b4847b4c126775b24f2e3beb84e2bd 100644 (file)
@@ -14308,6 +14308,9 @@ cleanup:
        return;
 
 skip_master:
+       if (transport != NULL) {
+               dns_transport_detach(&transport);
+       }
        if (key != NULL) {
                dns_tsigkey_detach(&key);
        }
index 0282f9bc6b51a2cc707dd4b19a8e61d0da459e5e..06feaf151ba9087709299f673cdfd558c0c9ad84 100644 (file)
 ./bin/tests/system/dnstap/tests.sh             SH      2015,2016,2017,2018,2019,2020,2021
 ./bin/tests/system/dnstap/ydump.py             PYTHON  2016,2017,2018,2019,2020,2021
 ./bin/tests/system/doth/clean.sh               SH      2020,2021
-./bin/tests/system/doth/dig1.good              X       2021
+./bin/tests/system/doth/example.axfr.good      X       2021
 ./bin/tests/system/doth/ns2/cert.pem           X       2021
 ./bin/tests/system/doth/ns2/key.pem            X       2021
 ./bin/tests/system/doth/setup.sh               SH      2021