[Unbound-users] Python module and return codes

Leandro Tino leandro at itevoluxion.com
Fri Jul 23 19:12:21 UTC 2010


Hello all!

Any of you are using pythonmods? Could you please tell me if I am  
misusing rcodes in operate function? (Please find attached my last e- 
mail)

Why I'm always getting NOERROR inside operate function, even when my  
query indeed returns NXDOMAIN?

What am I doing wrong?

Thanks in advance!
Leandro.


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


On Jul 19, 2010, at 4:27 PM, Leandro Tino wrote:

> 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
>
> _______________________________________________
> Unbound-users mailing list
> Unbound-users at unbound.net
> http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users


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


More information about the Unbound-users mailing list