[Unbound-users] Python module and return codes

Leandro Tino leandro at itevoluxion.com
Mon Jul 19 19:27:49 UTC 2010


Hello everyone,

I want to use a python module to intercept a NXDOMAIN condition.

Inside operate function, I am asking for rcodes as simply as :

def operate(id, event, qstate, qdata):

     if qstate.return_rcode == RCODE_NOERROR:
         log_info("RCODE_NOERROR")
     if qstate.return_rcode == RCODE_NXDOMAIN:
         log_info("RCODE_NXDOMAIN")

	... etc ...


Even though I correctly get NXDOMAIN return code if I make queries  
from DNS client, my operate function always gives NOERROR  
independently of actual rcode returned.

All other examples work perfectly.

Could you please tell me what am I doing wrong?

Thanks!
Leandro.


Leandro C. Tino | IT evoluxion
Viamonte 577 Piso 8º, Capital Federal, Buenos Aires, Argentina

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20100719/a9bb14de/attachment.htm>


More information about the Unbound-users mailing list