mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 17:52:10 -04:00
Replace digdelv/ans4 with AsyncDnsServer
Configure the AsyncDnsServer to ignore all queries to ensure the same
behaviour as with "//" command for ans.pl.
(cherry picked from commit 648f2534b1)
This commit is contained in:
parent
808e84d1b9
commit
0e6c9cae68
3 changed files with 25 additions and 3 deletions
25
bin/tests/system/digdelv/ans4/ans.py
Normal file
25
bin/tests/system/digdelv/ans4/ans.py
Normal file
|
|
@ -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()
|
||||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue