2021-06-03 08:37:05 +02:00
|
|
|
<!--
|
1999-04-10 00:37:31 +00:00
|
|
|
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2016-06-27 14:56:38 +10:00
|
|
|
|
1999-04-10 00:37:31 +00:00
|
|
|
SPDX-License-Identifier: MPL-2.0
|
2021-06-03 08:37:05 +02:00
|
|
|
|
2000-08-09 04:37:43 +00:00
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
2021-06-03 08:37:05 +02:00
|
|
|
|
2000-08-09 04:37:43 +00:00
|
|
|
See the COPYRIGHT file distributed with this work for additional
|
|
|
|
information regarding copyright ownership.
|
2021-06-03 08:37:05 +02:00
|
|
|
-->
|
2018-02-23 09:53:12 +01:00
|
|
|
|
1999-04-10 00:37:31 +00:00
|
|
|
Negative Caching
|
|
|
|
|
|
|
|
The non-DNSSEC case is pretty easy.
|
|
|
|
|
|
|
|
foundname = soa name
|
|
|
|
rdataset = soa
|
|
|
|
node = NULL
|
|
|
|
|
|
|
|
DNSSEC complicates things a lot, because we have to return one or more NXT
|
|
|
|
records (if we have them) as proof. Another tricky bit here is that we may
|
|
|
|
have an NXT record so we know the answer is NODATA, but we don't have the SOA
|
|
|
|
so we can't make a NODATA response that a non-DNSSEC-aware server could
|
|
|
|
cache. Life would sure be easier if we knew if the client understood DNSSEC.
|
|
|
|
Not sure what to do in this case. Probably return delegation to force client
|
|
|
|
to ask authority.
|
|
|
|
|
|
|
|
|
|
|
|
Perhaps we should just create some kind of meta-rdata, the "negative cache
|
|
|
|
rdata type"?
|
|
|
|
|
|
|
|
Or maybe something like:
|
|
|
|
|
|
|
|
dns_rdataset_ncachefirst()
|
|
|
|
dns_rdataset_ncachenext()
|
|
|
|
dns_rdataset_ncachecurrent()
|
|
|
|
|
|
|
|
dns_db_ncachenew(db, type) /* type can be any */
|
|
|
|
dns_db_ncachesoa(name, rdataset)
|
|
|
|
dns_db_ncachenxt(name, rdataset)
|
|
|
|
dns_db_ncacheadd(db, name, version)
|
|
|
|
|
|
|
|
Ick. I favor the former.
|