<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all!<div><br></div><div>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) </div><div><br></div><div>Why I'm always getting NOERROR inside operate function, even when my query indeed returns NXDOMAIN?</div><div><br></div><div>What am I doing wrong?</div><div><br></div><div>Thanks in advance!</div><div>Leandro. </div><div><br></div><div><br><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><b><font class="Apple-style-span" size="3"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px; ">Leandro C. Tino</span></font><span class="Apple-style-span" style="font-size: 13px; "> <span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; ">|<span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "> <span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>IT evol</b></span></font><font class="Apple-style-span" color="#00843A"><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>ux</b></span></font></font><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>ion</b></span></font></span></span></span></span></font></b></div><div><b><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "><span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Viamonte 577 Piso 8º, Capital Federal, Buenos Aires, Argentina</span></span></font></span></span></span></span></font></b></div></div></div></span></div></div></div></div></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><b><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "><span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></span></font></span></span></span></span></font></b></div></div><div><b><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "><span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></span></font></span></span></span></span></font></b></div></div></span></div></div></div></div></div><div><div><div>On Jul 19, 2010, at 4:27 PM, Leandro Tino wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello everyone,<div><br></div><div>I want to use a python module to intercept a NXDOMAIN condition.</div><div><br></div><div>Inside operate function, I am asking for rcodes as simply as :</div><div><br></div><div><div><b>def operate(id, event, qstate, qdata):</b></div><div><b><br></b></div><div> if qstate.return_rcode == RCODE_NOERROR:</div><div> log_info("RCODE_NOERROR")</div><div> if qstate.return_rcode == RCODE_NXDOMAIN:</div><div> log_info("RCODE_NXDOMAIN")</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>... etc ...</div><div><br></div><div><br></div><div>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.</div><div><br></div><div>All other examples work perfectly.</div><div><br></div><div>Could you please tell me what am I doing wrong? </div><div><br></div></div><div>Thanks!</div><div>Leandro.</div><div><br></div><div><br></div><div><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><b><font class="Apple-style-span" size="3"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px; ">Leandro C. Tino</span></font><span class="Apple-style-span" style="font-size: 13px; "> <span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; ">|<span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "> <span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>IT evol</b></span></font><font class="Apple-style-span" color="#00843A"><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>ux</b></span></font></font><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><b>ion</b></span></font></span></span></span></span></font></b></div><div><b><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="font-size: 14px; font-weight: normal; font-family: Arial; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; font-weight: bold; "><span class="Apple-style-span" style="font-size: medium; font-weight: normal; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Viamonte 577 Piso 8º, Capital Federal, Buenos Aires, Argentina</span></span></font></span></span></span></span></font></b></div></div></div></span></div> </div><br></div></div>_______________________________________________<br>Unbound-users mailing list<br><a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br>http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px;"><b><br></b></span></font></div></div></div></span></div></span></div></div></body></html>