--- /dev/null
+# 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()
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