cvs updates from Wed Dec 15 17:45:22 EST 2010
[tridge/bind9.git] / doc / design / ncache
1 Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
2 Copyright (C) 1999-2001  Internet Software Consortium.
3 See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
4
5 $Id: ncache,v 1.7 2004/03/05 05:04:46 marka Exp $
6
7 Negative Caching
8
9 The non-DNSSEC case is pretty easy.
10
11         foundname = soa name
12         rdataset = soa
13         node = NULL
14
15 DNSSEC complicates things a lot, because we have to return one or more NXT
16 records (if we have them) as proof.  Another tricky bit here is that we may
17 have an NXT record so we know the answer is NODATA, but we don't have the SOA
18 so we can't make a NODATA response that a non-DNSSEC-aware server could
19 cache.  Life would sure be easier if we knew if the client understood DNSSEC.
20 Not sure what to do in this case.  Probably return delegation to force client
21 to ask authority.
22
23
24 Perhaps we should just create some kind of meta-rdata, the "negative cache
25 rdata type"?
26
27 Or maybe something like:
28
29 dns_rdataset_ncachefirst()
30 dns_rdataset_ncachenext()
31 dns_rdataset_ncachecurrent()
32
33 dns_db_ncachenew(db, type)              /* type can be any */
34 dns_db_ncachesoa(name, rdataset)
35 dns_db_ncachenxt(name, rdataset)
36 dns_db_ncacheadd(db, name, version)
37
38 Ick.  I favor the former.