Custom response for PTR records

Eduard Ahmatgareev e.ahmatgareev at gmail.com
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 192.168.1.1" % qstate.qinfo.qname_str)
if (qstate.qinfo.qtype == RR_TYPE_SRV) or (qstate.qinfo.qtype ==
RR_TYPE_ANY):
    msg.answer.append("%s 10 IN SRV 0 0 80 neinfo.example.com." %
qstate.qinfo.qname_str)
if (qstate.qinfo.qtype == RR_TYPE_TXT) or (qstate.qinfo.qtype ==
RR_TYPE_ANY):
    msg.answer.append("%s 10 IN TXT path=/" % qstate.qinfo.qname_str)

but for PTR records?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20191024/857460c8/attachment.htm>


More information about the Unbound-users mailing list