Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it' into 'master'

dnstap-read: clear buffer before expanding it

Closes #1093

See merge request isc-projects/bind9!2049
This commit is contained in:
Michał Kępień 2019-06-28 07:08:35 -04:00
commit f895e4aaf2
6 changed files with 35 additions and 0 deletions

View file

@ -1,3 +1,6 @@
5260. [bug] dnstap-read was producing malformed output for large
packets. [GL #1093]
5259. [func] New option '-i' for 'named-checkconf' to ignore
warnings about deprecated options. [GL #1101]

View file

@ -0,0 +1,20 @@
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
The "large-answer.fstrm" file was generated by configuring a named instance
compiled with --enable-dnstap and --enable-fixed-rrset with the following
directives:
minimal-responses yes;
rrset-order { order fixed; };
dnstap { auth response; };
dnstap-identity none;
dnstap-output file "large-answer.fstrm";
The captured RRset from the "example." zone was created using:
$GENERATE 1-48 @ IN A 127.0.0.$
A server instance set up this way was then queried non-recursively (RD=0) for
"example/A".

Binary file not shown.

View file

@ -736,5 +736,14 @@ EOF
status=`expr $status + $ret`
fi
echo_i "checking large packet printing"
ret=0
# Expect one occurrence of "opcode: QUERY" below "reponse_message_data" and
# another one below "response_message".
lines=`$DNSTAPREAD -y large-answer.fstrm | grep -c "opcode: QUERY"`
[ $lines -eq 2 ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1

View file

@ -155,6 +155,7 @@ print_packet(dns_dtdata_t *dt, const dns_master_style_t *style) {
result = dns_message_totext(dt->msg, style, 0, b);
if (result == ISC_R_NOSPACE) {
isc_buffer_clear(b);
textlen *= 2;
continue;
} else if (result == ISC_R_SUCCESS) {

View file

@ -558,7 +558,9 @@
./bin/tests/system/dnssec/signer/general/bogus-ksk.key X 2018,2019
./bin/tests/system/dnssec/signer/general/bogus-zsk.key X 2018,2019
./bin/tests/system/dnssec/tests.sh SH 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
./bin/tests/system/dnstap/README TXT.BRIEF 2019
./bin/tests/system/dnstap/clean.sh SH 2015,2016,2017,2018,2019
./bin/tests/system/dnstap/large-answer.fstrm X 2019
./bin/tests/system/dnstap/setup.sh SH 2018,2019
./bin/tests/system/dnstap/tests.sh SH 2015,2016,2017,2018,2019
./bin/tests/system/dnstap/ydump.py PYTHON 2016,2017,2018,2019