Re: dnscache and oversized answers
Daryl Tester <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
(* Reply-to munged *) John Levine wrote: >> - if (r + 1 > sizeof udpbuf) return 0; >> + if (r + 1 > sizeof udpbuf) return firsttcp(d); >> >> if (irrelevant(d,udpbuf,r)) return 0; >> if (serverwantstcp(udpbuf,r)) return firsttcp(d); > Thanks, that works great. > > From a security point of view, it'd probably be better to check the > irrelevant bit before falling back to TCP, but that seems like a minor > bug since at worst it'd provoke redundant lookups to the real server. Don't you need the whole packet (which has just been truncated) to call irrelevant()? -- Regards, Daryl Tester "I'm beginning to wonder about Cap'n Snooze's military credentials."