Re: dnscache and oversized answers
"Matthew Dempsky" <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Oct 10, 2008 at 5:02 PM, Matthew Dempsky <[email protected]> wrote: > - char udpbuf[513]; > + char udpbuf[4097]; There was a question off-list whether this is really all that's needed to support receiving DNS packets larger than 512 bytes over UDP. The answer is yes. Almost all code in djbdns that processes received DNS packets are unaware of whether they were received over UDP or TCP, so they already need to support packets >512 bytes. The only exception is the little bit of code in dns_transmit() that actually uses udpbuf directly, which determines its size using "sizeof udpbuf" and does no real processing of the packet itself either. (irrelevant(), serverwantstcp(), and serverfailed() are called on packets received over TCP as well.)