e1672380d3c3493f376f853d769ce3a93299687csctemmeCopyright (C) 1999-2001, 2004, 2016 Internet Systems Consortium, Inc. ("ISC")
e1672380d3c3493f376f853d769ce3a93299687csctemmeThis Source Code Form is subject to the terms of the Mozilla Public
1d5143b81c45d4afc67e1cad3d7ba5193fe68296takashiLicense, v. 2.0. If a copy of the MPL was not distributed with this
e1672380d3c3493f376f853d769ce3a93299687csctemmefile, You can obtain one at http://mozilla.org/MPL/2.0/.
e1672380d3c3493f376f853d769ce3a93299687csctemme$Id: ncache,v 1.7 2004/03/05 05:04:46 marka Exp $
e1672380d3c3493f376f853d769ce3a93299687csctemmeNegative Caching
e1672380d3c3493f376f853d769ce3a93299687csctemmeThe non-DNSSEC case is pretty easy.
e1672380d3c3493f376f853d769ce3a93299687csctemme foundname = soa name
e1672380d3c3493f376f853d769ce3a93299687csctemme rdataset = soa
e1672380d3c3493f376f853d769ce3a93299687csctemme node = NULL
e1672380d3c3493f376f853d769ce3a93299687csctemmeDNSSEC complicates things a lot, because we have to return one or more NXT
e1672380d3c3493f376f853d769ce3a93299687csctemmerecords (if we have them) as proof. Another tricky bit here is that we may
e1672380d3c3493f376f853d769ce3a93299687csctemmehave an NXT record so we know the answer is NODATA, but we don't have the SOA
e1672380d3c3493f376f853d769ce3a93299687csctemmeso we can't make a NODATA response that a non-DNSSEC-aware server could
e1672380d3c3493f376f853d769ce3a93299687csctemmecache. Life would sure be easier if we knew if the client understood DNSSEC.
e1672380d3c3493f376f853d769ce3a93299687csctemmeNot sure what to do in this case. Probably return delegation to force client
e1672380d3c3493f376f853d769ce3a93299687csctemmeto ask authority.
e1672380d3c3493f376f853d769ce3a93299687csctemmePerhaps we should just create some kind of meta-rdata, the "negative cache
e1672380d3c3493f376f853d769ce3a93299687csctemmerdata type"?
e1672380d3c3493f376f853d769ce3a93299687csctemmeOr maybe something like:
e1672380d3c3493f376f853d769ce3a93299687csctemmedns_rdataset_ncachefirst()
e1672380d3c3493f376f853d769ce3a93299687csctemmedns_rdataset_ncachenext()
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coardns_rdataset_ncachecurrent()
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coardns_db_ncachenew(db, type) /* type can be any */
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coardns_db_ncachesoa(name, rdataset)
e1672380d3c3493f376f853d769ce3a93299687csctemmedns_db_ncachenxt(name, rdataset)
e1672380d3c3493f376f853d769ce3a93299687csctemmedns_db_ncacheadd(db, name, version)
e1672380d3c3493f376f853d769ce3a93299687csctemmeIck. I favor the former.