Re: djbdns/dnscache poisoning weakness

Jeff King <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On Wed, Feb 11, 2009 at 03:32:23PM -0600, David Nicol wrote:

> I have not looked at your patch.  I had imagined a state machine,
> where a query, either from a client or intermediate, is either (1)
> cached within timeout or (2) unknown.  And I imagined the combination
> process could be implemented by introducing a third state, (3) query
> in process for this information with attendant query attachment
> mechanism.

OK, that is more or less how it works. But instead of a state machine,
it is actually a merging layer between the rest of dnscache and the
dns_transmit library. I.e.,

  dnscache ------> dns_transmit
        send Q to IP
           <------
           answer

becomes

  dnscache -----> qmerge ------> dns_transmit
                   | ^
                   v |
            array of outstanding
              transmissions

I'm sure there are probably better or more efficient ways to implement
it (e.g., using a state machine in the cache), but I wanted to keep the
changes very minimal and easy to read.

-Peff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.