Question about getaddrinfo taking 20 seconds
Eugen Dedu
Eugen.Dedu@pu-pm.univ-fcomte.fr
Mon Jul 16 18:43:00 GMT 2012
On 16/07/12 20:07, Yann Droneaud wrote:
> Hi,
>
> Le lundi 16 juillet 2012 à 12:53 +0200, Eugen Dedu a écrit :
>>
>> I have a dns-related question. The following program shows here 20
>> seconds, which means that getaddrinfo with AI_CANONNAME takes 20
>> seconds. Is it normal?
>
> [...]
>
>> const char *name = "stun.ekiga.net";
>
> [...]
>
> Request with dig "stun.ekiga.net" A, returns:
> stun.ekiga.net. 2385 IN CNAME stun.voipbuster.com.
> stun.voipbuster.com. 516 IN A 77.72.169.158
> stun.voipbuster.com. 516 IN A 77.72.169.156
> stun.voipbuster.com. 516 IN A 77.72.169.154
> stun.voipbuster.com. 516 IN A 77.72.169.152
>
> When trying a retrieve reverse PTR records for
> 77.72.169.158, 77.72.169.156, 77.72.169.154, 77.72.169.152
> with dig -x, I'm getting either "SERVFAIL" or timeout errors.
>
> So, the latencies are probably related to the reverse PTR which seems to
> be misconfigured.
>
> In fact, according to some DNS server/resolver log, the exact error is:
>
> Jul 16 20:01:45 quoi named[6493]: error (unexpected RCODE REFUSED)
> resolving '152.169.72.77.in-addr.arpa/PTR/IN': 77.72.174.217#53
> Jul 16 20:01:45 quoi named[6493]: error (host unreachable) resolving
> '152.169.72.77.in-addr.arpa/PTR/IN': 77.72.175.217#53
I (or my friends) tried this program on five networks (one different
machine per network), with the following times : 20, 20, 15, 5, and 0
seconds.
Why some of them do not timeout, while others do?
What can I do to solve this issue? Is there a workaround in the code?
Should I contact the guys on stun.voipbuster.com to fix the issue?
--
Eugen
More information about the Libc-help
mailing list