]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace digdelv/ans4 with AsyncDnsServer
authorNicki Křížek <nicki@isc.org>
Thu, 27 Nov 2025 17:12:55 +0000 (18:12 +0100)
committerNicki Křížek <nicki@isc.org>
Mon, 12 Jan 2026 10:05:48 +0000 (11:05 +0100)
Configure the AsyncDnsServer to ignore all queries to ensure the same
behaviour as with "//" command for ans.pl.

bin/tests/system/digdelv/ans4/ans.py [new file with mode: 0644]
bin/tests/system/digdelv/ans4/startme [deleted file]
bin/tests/system/digdelv/tests.sh

diff --git a/bin/tests/system/digdelv/ans4/ans.py b/bin/tests/system/digdelv/ans4/ans.py
new file mode 100644 (file)
index 0000000..6f5346f
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+from isctest.asyncserver import (
+    AsyncDnsServer,
+    IgnoreAllQueries,
+)
+
+
+def main() -> None:
+    server = AsyncDnsServer()
+    server.install_response_handler(IgnoreAllQueries())
+    server.run()
+
+
+if __name__ == "__main__":
+    main()
diff --git a/bin/tests/system/digdelv/ans4/startme b/bin/tests/system/digdelv/ans4/startme
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
index 775bca31f4a88a56b0433c0a548cc0e1fde1eb40..aa49344ee67f3eacfadee3c991a301fbe9080c63 100644 (file)
@@ -382,8 +382,6 @@ if [ -x "$DIG" ]; then
   n=$((n + 1))
   echo_i "checking dig preserves origin on TCP retries ($n)"
   ret=0
-  # Ask ans4 to still accept TCP connections, but not respond to queries
-  echo "//" | sendcmd 10.53.0.4
   dig_with_opts -d +tcp @10.53.0.4 +retry=1 +time=1 +domain=bar foo >dig.out.test$n 2>&1 && ret=1
   test "$(grep -c "trying origin bar" dig.out.test$n)" -eq 2 || ret=1
   grep "using root origin" <dig.out.test$n >/dev/null && ret=1