[Pdns-users] Recursor : Lua & udpQueryResponse questions

Remi Gacogne remi.gacogne at powerdns.com
Wed Jun 5 08:01:44 UTC 2019

Hi David,

> 1/ what is the timeout of a "udpQueryResponse" call via 
> dq.followUpFunction ? is there any relationship with the 
> "network-timeout" parameter ?

Yes, 'network-timeout' is applied there as well.

> 2/ my answer is a CNAME (with the FQDN found) with a specific TTL 
> ("cnameTTL=345600") and with a followCNAMERecords follow-up function 
> : dq:addAnswer(pdns.CNAME, dq.udpAnswer, cnameTTL) dq.rcode = 0 
> dq.followupFunction="followCNAMERecords"
> But it seems that the response is only cached in the Packet Cache, 
> because 1 hour after the first udp server call, the resolver
> executes the udp server call again, and 1H is my default
> "packetcache-ttl" value. Maybe it's the wanted behaviour because I
> use the "nxdomain" hook ?

There are two different parts here, the CNAME that you craft via
dq:addAnswer(), and the target of that CNAME which is retrieved via
The first part will not be inserted into the record cache because it
does not came from an authoritative server and thus does not go through
the regular path.
The second one, the target of the CNAME, will be retrieved via the
normal resolution process and will therefore be inserted into the record
The final response will indeed be inserted into the packet cache.

> Is there an implementation that may put my answer in the Record Cache
> (with respect of my TTL) ?

I'm afraid we currently don't provide a way to interact with the record
cache from Lua, so I don't think it's possible.

Best regards,
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190605/c4209a8b/attachment.sig>

More information about the Pdns-users mailing list