]> 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 (GitLab job 6713398) <nicki@isc.org>
Mon, 12 Jan 2026 10:53:23 +0000 (10:53 +0000)
Configure the AsyncDnsServer to ignore all queries to ensure the same
behaviour as with "//" command for ans.pl.

(cherry picked from commit 648f2534b1579c3a47c4a223c89db5ef9933c0dc)

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 265366a247750f4c90e3c43bb74596fb9a53db54..dee3e96486a72c4ae0de2c10c981b5110c32288a 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