aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/naming/utils
diff options
context:
space:
mode:
authorGravatar Alexander Polcyn <apolcyn@google.com>2018-03-08 17:41:30 -0800
committerGravatar Alexander Polcyn <apolcyn@google.com>2018-06-06 13:55:13 -0700
commit27718ce64dc1d5dcfc954aa6748191259fc68c59 (patch)
tree526f314618b00235d9f9675901788fb195d9e1f7 /test/cpp/naming/utils
parentf03344e73a4e0eafb969fe4675babcb50ac08ae6 (diff)
Fix c-ares tests ipv6-only brokenness
Diffstat (limited to 'test/cpp/naming/utils')
-rwxr-xr-xtest/cpp/naming/utils/dns_resolver.py2
-rwxr-xr-xtest/cpp/naming/utils/dns_server.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/test/cpp/naming/utils/dns_resolver.py b/test/cpp/naming/utils/dns_resolver.py
index 74f4ca2351..21e37562db 100755
--- a/test/cpp/naming/utils/dns_resolver.py
+++ b/test/cpp/naming/utils/dns_resolver.py
@@ -25,7 +25,7 @@ import twisted.internet.reactor as reactor
def main():
argp = argparse.ArgumentParser(description='Make DNS queries for A records')
- argp.add_argument('-s', '--server_host', default='127.0.0.1', type=str,
+ argp.add_argument('-s', '--server_host', default='::1', type=str,
help='Host for DNS server to listen on for TCP and UDP.')
argp.add_argument('-p', '--server_port', default=53, type=int,
help='Port that the DNS server is listening on.')
diff --git a/test/cpp/naming/utils/dns_server.py b/test/cpp/naming/utils/dns_server.py
index 1e8e2e3287..e198dd132d 100755
--- a/test/cpp/naming/utils/dns_server.py
+++ b/test/cpp/naming/utils/dns_server.py
@@ -103,11 +103,11 @@ def start_local_dns_server(args):
server = twisted.names.server.DNSServerFactory(
authorities=[test_domain_com], verbose=2)
server.noisy = 2
- twisted.internet.reactor.listenTCP(args.port, server)
+ twisted.internet.reactor.listenTCP(args.port, server, interface='::1')
dns_proto = twisted.names.dns.DNSDatagramProtocol(server)
dns_proto.noisy = 2
- twisted.internet.reactor.listenUDP(args.port, dns_proto)
- print('starting local dns server on 127.0.0.1:%s' % args.port)
+ twisted.internet.reactor.listenUDP(args.port, dns_proto, interface='::1')
+ print('starting local dns server on [::1]:%s' % args.port)
print('starting twisted.internet.reactor')
twisted.internet.reactor.suggestThreadPoolSize(1)
twisted.internet.reactor.run()