]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Multiply 1996-alloc_dnsbuf-crash-test.pkt by 300000 via TCP
authorOndřej Surý <ondrej@isc.org>
Tue, 1 Sep 2020 07:37:05 +0000 (09:37 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 2 Sep 2020 10:46:43 +0000 (12:46 +0200)
The test for assertion failure via large TCP packet needs to be repeated
multiple times (we use 300000).  This commit fixes the input file to be
properly hexlified and uses the new packet.pl -r feature to send it
300000 times via TCP.

(cherry picked from commit 5f6eb014aaa3391259db71d06e6367ced5672d13)

bin/tests/system/tcp/1996-alloc_dnsbuf-crash-test.pkt [new file with mode: 0644]
bin/tests/system/tcp/tests.sh

diff --git a/bin/tests/system/tcp/1996-alloc_dnsbuf-crash-test.pkt b/bin/tests/system/tcp/1996-alloc_dnsbuf-crash-test.pkt
new file mode 100644 (file)
index 0000000..7520c3a
--- /dev/null
@@ -0,0 +1,12 @@
+# Transaction ID
+0001
+# Standard query
+0000
+# Questions: 1, Additional: 1
+0001 0000 0000 0000
+# QNAME: www.isc.org
+03 697363 03 6F7267 00
+# Type: AXFR
+00fc
+# Class: IN
+0001
index 618d435c8269b30972d5916f90357db5e776926a..3fb5f3fd8f8e0fddbdf1701e45d371477d8d9927 100644 (file)
@@ -187,7 +187,7 @@ status=$((status + ret))
 n=$((n + 1))
 echo_i "checking that BIND 9 doesn't crash on long TCP messages ($n)"
 ret=0
-$PERL ../packet.pl -a "10.53.0.1" -p "${PORT}" -t udp 1996-alloc_dnsbuf-crash-test.pkt || ret=1
+$PERL ../packet.pl -a "10.53.0.1" -p "${PORT}" -t tcp -r 300000 1996-alloc_dnsbuf-crash-test.pkt || ret=1
 dig_with_opts +tcp @10.53.0.1 txt.example > dig.out.test$n || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))