Fix a XoT crash

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'.
This commit is contained in:
Matthijs Mekking
2021-03-15 15:08:04 +01:00
parent 24c796942f
commit ee0835d977
6 changed files with 12 additions and 3 deletions

View File

@@ -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]

View 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

View 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]

View File

@@ -14308,6 +14308,9 @@ cleanup:
return;
skip_master:
if (transport != NULL) {
dns_transport_detach(&transport);
}
if (key != NULL) {
dns_tsigkey_detach(&key);
}

View File

@@ -369,7 +369,7 @@
./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