<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
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.<br>
<br>
According to the API doc (<a class="moz-txt-link-freetext" href="http://getdnsapi.org/spec.html#8.7">http://getdnsapi.org/spec.html#8.7</a>) a <i>list</i>
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.<br>
<br>
This is the configuration of my context:<br>
<tt>{</tt><tt><br>
</tt><tt> "all_context":</tt><tt><br>
</tt><tt> {</tt><tt><br>
</tt><tt> "append_name": GETDNS_APPEND_NAME_ALWAYS,</tt><tt><br>
</tt><tt> "dns_transport_list":</tt><tt><br>
</tt><tt> [</tt><tt><br>
</tt><tt> GETDNS_TRANSPORT_UDP,</tt><tt><br>
</tt><tt> GETDNS_TRANSPORT_TCP</tt><tt><br>
</tt><tt> ],</tt><tt><br>
</tt><tt> "dnssec_allowed_skew": 0,</tt><tt><br>
</tt><tt> "edns_do_bit": 0,</tt><tt><br>
</tt><tt> "edns_extended_rcode": 0,</tt><tt><br>
</tt><tt> "edns_version": 0,</tt><tt><br>
</tt><tt> "follow_redirects": GETDNS_REDIRECTS_FOLLOW,</tt><tt><br>
</tt><tt> "limit_outstanding_queries": 0,</tt><tt><br>
</tt><tt> "namespaces":</tt><tt><br>
</tt><tt> [</tt><tt><br>
</tt><tt> GETDNS_NAMESPACE_LOCALNAMES,</tt><tt><br>
</tt><tt> GETDNS_NAMESPACE_DNS</tt><tt><br>
</tt><tt> ],</tt><tt><br>
</tt><tt> "suffix": [],</tt><tt><br>
</tt><tt> "timeout": 200,</tt><tt><br>
</tt><tt> "tls_authentication": GETDNS_AUTHENTICATION_NONE,</tt><tt><br>
</tt><tt> "upstream_recursive_servers":</tt><tt><br>
</tt><tt> [</tt><tt><br>
</tt><tt> {</tt><tt><br>
</tt><tt> "address_data": <bindata for 192.168.99.120>,</tt><tt><br>
</tt><tt> "address_type": <bindata of "IPv4">,</tt><tt><br>
</tt><tt> "tls_port": 853</tt><tt><br>
</tt><tt> },</tt><tt><br>
</tt><tt> {</tt><tt><br>
</tt><tt> "address_data": <bindata for 192.168.99.121>,</tt><tt><br>
</tt><tt> "address_type": <bindata of "IPv4">,</tt><tt><br>
</tt><tt> "tls_port": 853</tt><tt><br>
</tt><tt> },</tt><tt><br>
</tt><tt> {</tt><tt><br>
</tt><tt> "address_data": <bindata for 8.8.8.8>,</tt><tt><br>
</tt><tt> "address_type": <bindata of "IPv4">,</tt><tt><br>
</tt><tt> "tls_port": 853</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt><tt> ]</tt><tt><br>
</tt><tt> },</tt><tt><br>
</tt><tt> "implementation_string": <bindata of
<a class="moz-txt-link-rfc2396E" href="https://getdnsapi.net">"https://getdnsapi.net"</a>>,</tt><tt><br>
</tt><tt> "resolution_type": GETDNS_RESOLUTION_STUB,</tt><tt><br>
</tt><tt> "version_string": <bindata of "0.9.0"></tt><tt><br>
</tt><tt>}</tt><br>
Did I miss something here?<br>
<br>
For the query itself I use getdns_general(), e.g.:<br>
<tt>if ((r = getdns_general(context,
"8.1.2.7.5.9.3.4.1.1.3.e164.test.net.",</tt><tt><br>
</tt><tt> GETDNS_RRTYPE_NAPTR,</tt><tt><br>
</tt><tt> extensions, userarg,
&transaction_id, callback)))</tt><tt><br>
</tt><tt> fprintf(stderr, "Error scheduling request: %s
(%d)\n",</tt><tt><br>
</tt><tt> getdns_get_errorstr_by_id(r), r);</tt><br>
<br>
<br>
Is there some way to configure multiple servers where on a timeout
the next one is tried?<br>
<br>
Cheers,<br>
Robert<br>
<br>
<br>
</body>
</html>