]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a a tcp system test case
authorAram Sargsyan <aram@isc.org>
Thu, 24 Aug 2023 11:41:07 +0000 (11:41 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 24 Aug 2023 11:59:57 +0000 (11:59 +0000)
The new test sends a 64 KiB message over TCP to named, and expects
it to handle it correctly.

bin/tests/system/tcp/tests_tcp.py

index 532b47b958bdb7e62298e13c536b174605e843fb..f6161946ff9d760cc2f9a69522c939a2638a0072 100644 (file)
@@ -114,3 +114,21 @@ def test_close_wait(named_port):
         msg = create_msg("a.example.", "A")
         (sbytes, stime) = dns.query.send_tcp(sock, msg, timeout())
         (response, rtime) = dns.query.receive_tcp(sock, timeout())
+
+
+# GL #4273
+def test_tcp_big(named_port):
+    with create_socket("10.53.0.7", named_port) as sock:
+        msg = dns.message.Message(id=0)
+        msg.flags = dns.flags.RD
+        msg.question.append(dns.rrset.from_text(dns.name.root, 0, 1, "URI"))
+        msg.additional.append(
+            dns.rrset.from_text(dns.name.root, 0, 1, "URI", "0 0 " + "b" * 65503)
+        )
+        (sbytes, stime) = dns.query.send_tcp(sock, msg, timeout())
+        (response, rtime) = dns.query.receive_tcp(sock, timeout())
+
+        # Now check that the server is alive and well
+        msg = create_msg("a.example.", "A")
+        (sbytes, stime) = dns.query.send_tcp(sock, msg, timeout())
+        (response, rtime) = dns.query.receive_tcp(sock, timeout())