[getdns-api] Upstream servers
Robert Groenenberg
robert.groenenberg at broadforward.com
Tue Jan 26 16:42:15 CET 2016
Hi,
I am looking into using getdns for doing ENUM queries from an
application. Based on the examples I've build a small test application
which works Ok as a stub resolver doing a query to a configured upstream
server.
According to the API doc (http://getdnsapi.org/spec.html#8.7) a /list/
of upstream servers can be configured. I would expect that when the
first server does not respond, the next one is queried. However, I found
that whatever the number of upstream servers configured only the first
is ever used (verified with tcpdump/wireshark), no matter what the
response (or lack thereof) from that first server is.
This is the configuration of my context:
{
"all_context":
{
"append_name": GETDNS_APPEND_NAME_ALWAYS,
"dns_transport_list":
[
GETDNS_TRANSPORT_UDP,
GETDNS_TRANSPORT_TCP
],
"dnssec_allowed_skew": 0,
"edns_do_bit": 0,
"edns_extended_rcode": 0,
"edns_version": 0,
"follow_redirects": GETDNS_REDIRECTS_FOLLOW,
"limit_outstanding_queries": 0,
"namespaces":
[
GETDNS_NAMESPACE_LOCALNAMES,
GETDNS_NAMESPACE_DNS
],
"suffix": [],
"timeout": 200,
"tls_authentication": GETDNS_AUTHENTICATION_NONE,
"upstream_recursive_servers":
[
{
"address_data": <bindata for 192.168.99.120>,
"address_type": <bindata of "IPv4">,
"tls_port": 853
},
{
"address_data": <bindata for 192.168.99.121>,
"address_type": <bindata of "IPv4">,
"tls_port": 853
},
{
"address_data": <bindata for 8.8.8.8>,
"address_type": <bindata of "IPv4">,
"tls_port": 853
}
]
},
"implementation_string": <bindata of "https://getdnsapi.net">,
"resolution_type": GETDNS_RESOLUTION_STUB,
"version_string": <bindata of "0.9.0">
}
Did I miss something here?
For the query itself I use getdns_general(), e.g.:
if ((r = getdns_general(context, "8.1.2.7.5.9.3.4.1.1.3.e164.test.net.",
GETDNS_RRTYPE_NAPTR,
extensions, userarg, &transaction_id,
callback)))
fprintf(stderr, "Error scheduling request: %s (%d)\n",
getdns_get_errorstr_by_id(r), r);
Is there some way to configure multiple servers where on a timeout the
next one is tried?
Cheers,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://getdnsapi.net/pipermail/spec/attachments/20160126/f8b53a9f/attachment.html>
More information about the spec
mailing list