Python module and return codes

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

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