<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi getdns users,</p>
<p><br>
</p>
<p>My name is Marcel and this is my 1st post to the user's list...</p>
<p><br>
</p>
<p>I have a question on the usage of the getdns API function
getdns_context_set_dns_transport_list().</p>
<p>With this function the user can provide an ordered list of
transport protocols that will be used for DNS lookups.</p>
<p>Fallback options are specified by including multiple values in
the list.</p>
<p><br>
</p>
<p>I did some experiments with transport fallback using the
following dns context<font face="Courier New, Courier, monospace">
(lib version 1.0.0b2).<br>
</font></p>
<p>Here, the transport list is 'first try UDP and if it fails try
TCP (the single IP address is masked)<br>
</p>
<p><font face="Courier New, Courier, monospace" size="-1">{#012
"all_context":#012 {#012 "append_name":
GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST,#012
"dns_transport_list":#012 [#012
GETDNS_TRANSPORT_UDP,#012 GETDNS_TRANSPORT_TCP#012
],#012 "dnssec_allowed_skew": 0,#012 "edns_do_bit":
0,#012 "edns_extended_rcode": 0,#012
"edns_maximum_udp_payload_size": 512,#012 "edns_version":
0,#012 "follow_redirects": GETDNS_REDIRECTS_FOLLOW,#012
"idle_timeout": 5000000,#012 "limit_outstanding_queries":
0,#012 "namespaces":#012 [#012
GETDNS_NAMESPACE_LOCALNAMES,#012
GETDNS_NAMESPACE_DNS#012 ],#012 "suffix": [],#012
"timeout": 1000,#012 "tls_authentication":
GETDNS_AUTHENTICATION_NONE,#012
"upstream_recursive_servers":#012 [#012 {#012
"address_data": <bindata for XXX.XXX.XXX.XXX>,#012
"address_type": <bindata of "IPv4">#012 }#012
]#012 },#012 "implementation_string": <bindata of
<a class="moz-txt-link-rfc2396E" href="https://getdnsapi.net">"https://getdnsapi.net"</a>>,#012 "resolution_type":
GETDNS_RESOLUTION_STUB,#012 "version_string": <bindata of
"1.0.0b2">#012}</font><br>
</p>
<p><br>
</p>
<p>The issue is that I was not seeing any transport fallback
attempts (using the same context). <br>
</p>
<p>When the DNS lookup failed (using UDP, timeout), there was no TCP
attempt during any of the next 10 lookups. The library just kept
on trying UDP.</p>
<p>Changing the order (TCP with fallback to UDP) did not make any
difference: it just kept on trying TCP. </p>
<p><br>
</p>
<p>Any feedback would be greatly appreciated!</p>
<p><br>
</p>
<p>Regards,</p>
<p>Marcel<br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>