Custom response for PTR records

Eduard Ahmatgareev e.ahmatgareev at
Thu Oct 24 18:28:54 UTC 2019

Hi All,

I found a lot of examples how it possible to make custom response for A
records in python module, but didn't find any example to make reponse for
PTR records:

do you have something like this:
if qstate.qinfo.qtype == RR_TYPE_A:
    msg.answer.append("%s 10 IN A" % qstate.qinfo.qname_str)
if (qstate.qinfo.qtype == RR_TYPE_SRV) or (qstate.qinfo.qtype ==
    msg.answer.append("%s 10 IN SRV 0 0 80" %
if (qstate.qinfo.qtype == RR_TYPE_TXT) or (qstate.qinfo.qtype ==
    msg.answer.append("%s 10 IN TXT path=/" % qstate.qinfo.qname_str)

but for PTR records?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Unbound-users mailing list