dns_ioevent() not called when DNS server is not recursive

Iñaki Baz Castillo ibc at aliax.net
Fri Feb 4 04:18:47 MSK 2011


2011/2/4 Iñaki Baz Castillo <ibc at aliax.net>:
> In my test I set a non recursive DNS server in /etc/resolv.conf, then
> I do an async DNS query. poll() returns true so something has arrived
> via UDP, but dns_ioevent() doesnt' call the callback routine. In fact,
> if I test the same using "getdns" I get an error "temporary failure in
> name resolution".
>
> So I assume that, indeed, an UDP DNS response has been replied by the
> server, but it contains a DNS error (maybe it says that the server is
> non recursive so cannot perform the query as the client has
> requested). Then when I call dns_ioevent() the callback is not
> executed.
>
> But after dns_ioevent() I check dns_status() and it returns 0, so no
> error. I don't understand why. Is it the expected behaviour? if so,
> how can I realize of the error?

Sorry, I was not using a non recursive DNS server, but a server that
REFUSES every DNS queries (my fault).
So I can understand that the callback routine is not executed upon
receipt of the error DNS response but, why does dns_status() return 0
instead of an error?

-- 
Iñaki Baz Castillo
<ibc at aliax.net>


More information about the udns mailing list