Re: Omitting out-of-control additional records from responses?
Matthew Dempsky <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 21, 2009 at 5:48 PM, Matthew Dempsky <[email protected]> wrote: > The (proof-of-concept) patch below omits out-of-control records from > the additional records section in authoritative responses. Embarrassingly, I didn't test the first patch before emailing it... this one actually works. :/ --- tdlookup.c.orig 2009-09-21 17:28:19.000000000 -0700 +++ tdlookup.c 2009-09-21 17:52:18.000000000 -0700 @@ -250,7 +250,7 @@ else if (!dns_packet_getname(response,arpos,bpos + 2,&d1)) return 0; case_lowerb(d1,dns_domain_length(d1)); - if (want(d1,DNS_T_A)) { + if ((!flagauthoritative || dns_domain_suffix(d1,control)) && want(d1,DNS_T_A)) { cdb_findstart(&c); while (r = find(d1,0)) { if (r == -1) return 0;