<div><br></div>Sorry about that, will be sure to note use of my own backend in the future.<div><br></div><div>As to the current issue I think this line of debug output is significant:</div><div><br></div><div>       Jul 25 12:31:51 returning <a href="http://ns1.bar.com">ns1.bar.com</a> <a href="http://ns1.bar.com">ns1.bar.com</a>. NS auth=1</div>

<div><br></div><div>This following code is setting weHaveUnauth to true because sd.qname != rr.qname</div><div><br></div><div><div>      // the line below fakes 'unauth NS' for delegations for non-DNSSEC backends.</div>

<div>      if((rr.qtype == p->qtype && !rr.auth) || (rr.qtype.getCode() == QType::NS && (!rr.auth || !pdns_iequals(sd.qname, rr.qname))))</div><div>        weHaveUnauth=1;</div><div><br></div></div><div>

<br></div><div>When that code executes, subsequent to the NS record returned above, sd.qname is <a href="http://bar.com">bar.com</a> and rr.qname is <a href="http://foo.bar.com">foo.bar.com</a>. <br><br><div class="gmail_quote">

<br></div><div class="gmail_quote"><br></div>
</div>