[bind10-dev] Blog comment from BDB developer
shane at isc.org
Thu Jun 24 21:49:49 UTC 2010
On Thu, 2010-06-24 at 18:00 +0000, Francis Dupont wrote:
> > Best we contact them soon since we need additional functionality from
> > BDB's C API to walk the zone backward as well as forward once we do a find.
> => the stupid answer is to create a cursor and to use it to get
> with DB_NEXT / DB_PREV. Of course this means to set comparison
> functions before... Now I am not an expert in BDB when a whole
> group of experts propose their help (:-)!
The problem with this is that we need the DB_NEXT/DB_PREV for handling
NXDOMAIN in DNSSEC. But with the C API if you get no match you doing get
a cursor back, you get a "no data found" return.
Evan (I think) proposed a brilliant hack of:
1. Inserting a data record if no match is found
2. Looking up a cursor at that record
3. Using DB_PREV to get the covering NSEC value
4. Deleting the data record we added
Clearly this is... sub-optimal. But I'm pretty sure it would work.
A better solution would be what Michael alluded to, which is to have a
lookup which returns "I didn't find the value you wanted, but this is
the previous/next match in the data we have". We think that the Java API
provides this functionality, so there should be no fundamental changes
to BDB to support it.
More information about the bind10-dev