2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00
Commit Graph

857 Commits

Author SHA1 Message Date
JINMEI Tatuya
eb04a1699b temporary branch for boost ASIO experiments
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/jinmei-asio@1194 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-08 06:50:23 +00:00
JINMEI Tatuya
b0cbeb1dcb exception safe bug. use vector instead of an array allocated by new[].
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1193 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-08 02:36:36 +00:00
JINMEI Tatuya
a902e5f1b4 corrected RR class for the static data source.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1192 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-08 00:43:34 +00:00
Evan Hunt
cc1498e0cf specify query class when calling findClosestEnclosure(), so that we can
skip data sources that definitely won't match.  (I'm not sure about the
design here and may revisit it, but there should be a marginal speedup
from not having to compare every single qname to "authors.bind" and
"version.bind".)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1191 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-08 00:03:04 +00:00
JINMEI Tatuya
298967b31a copyright, propset, emacs C++ mode specification
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1190 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 23:40:08 +00:00
Evan Hunt
38444dd8b0 use reverse-name lookup to find empty non-terminals (sqlite3's doc
claims this is optimized, but at present it looks as if it isn't).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1189 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 23:26:41 +00:00
JINMEI Tatuya
d08ed40d52 defined a new exception class, Sqlite3Error, to throw an exception with
sqlite3 related errors.
used the new class when Sqlite3DataSrc::open() failed.
added a test case for this.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1188 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 23:03:56 +00:00
Evan Hunt
657e6a2997 - fixed a compile bug in code I accidentally committed earlier
- added a RETERR macro for readability


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1187 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 22:54:00 +00:00
Jelte Jansen
8223760b18 need deepcopy() instead of shallow copy() for reverting to older data when new config is not accepted
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1186 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 22:52:34 +00:00
JINMEI Tatuya
51ef32bb1c allow isc_throw to have a partial statement using ostream + operator<<.
added notes about design choices and possible future changes.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1185 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 22:46:21 +00:00
Evan Hunt
7ca848e3c5 Corrected NSEC3 logic. When returning NXDOMAIN for a node that isn't
directly under the zone apex (i.e., a.b.c.d.e.foo.com), we need to return
the NSEC3 covering the closest enclosing name, not for the zone name
itself.  We also need to avoid sending multiple copies of the same NSEC3.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1184 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 22:24:33 +00:00
Evan Hunt
e9d6bcdabd cleaned up nsec3 code a bit
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1183 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 07:59:22 +00:00
JINMEI Tatuya
4614a568fa cleanup: unnecessary forward declarations
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1182 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 07:12:33 +00:00
JINMEI Tatuya
9857db0468 s/dns_throw/isc_throw/
now that the generic exception code is a separate library in the isc namespace
it doesn't make sense to call it dns_something.
I know it's a big change, but I believe we should do this cleanup sooner
than later.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1181 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 07:06:42 +00:00
JINMEI Tatuya
cd553ba8ae a minor clarification comment about sqlite3_close()
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1180 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 07:05:09 +00:00
JINMEI Tatuya
7367b6b0b5 use RRsetList::findRRset() instead operator[] to avoid the implicit assumption
of the RR Class being IN.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1179 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 06:36:59 +00:00
JINMEI Tatuya
ecdc1c915c cleanup: consolidated sql rows enumating code
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1178 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 06:35:22 +00:00
JINMEI Tatuya
737b559304 cancel some tests once a critical bug found, to avoid crash during tests
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1177 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 06:33:30 +00:00
JINMEI Tatuya
8d93893aa8 added a simple NSEC3 test
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1176 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 03:52:44 +00:00
JINMEI Tatuya
8fc0dcd4e1 fixed an exception-unsafe bug:
dynamically allocated "getNsec3Param *" can leak when exception happens
(and it can happen in this code) before it's deleted.

Remember: code that handles a bare pointer dynamically allocated by 'new' is
almost always buggy as long as we use exceptions.  let's drop that idea.

Note: in this specific case, shared_ptr is overspec because it doesn't have
to be shared.  boost::scoped_ptr should be sufficient, but since we already
rely on shared_ptr, I chose to minimize dependency.  (plus, NSEC3 processing
is heavy anyway, so performance overhead of shared_ptr doesn't matter much
in this context).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1175 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 03:18:49 +00:00
JINMEI Tatuya
a50b30361a made Nsec3Param member variables private as they don't have to be public.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1174 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 03:06:53 +00:00
JINMEI Tatuya
afa0f35d31 cleanup: avoided hardcoding the IN class
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1173 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 02:48:02 +00:00
JINMEI Tatuya
9c11638bec fixed a bug that Sqlite3 data source didn't return ANY queries
if the answer was generated from mixed ordered RRs.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1172 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 02:43:19 +00:00
JINMEI Tatuya
92b343db5d minor cleanups:
- removed redundant temporary variables
 - constified things as much as possible


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1171 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 02:17:15 +00:00
Jeremy C. Reed
8a0c9e17c0 Little more details, some cleanup, more structure.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1170 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:52:50 +00:00
Jeremy C. Reed
0c8b53cb80 Fix typo in module name.
Fix installation (old path before restructure).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1169 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:47:10 +00:00
JINMEI Tatuya
be0565dec9 propset
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1168 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:40:38 +00:00
JINMEI Tatuya
4509b24d62 more sqlite3 tests including re-init'ing the data source with different data
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1167 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:33:57 +00:00
JINMEI Tatuya
d44fec92e2 propset
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1166 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:23:17 +00:00
JINMEI Tatuya
9f683adcff more sqlite3 data source tests, covering the findAddrs() method.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1165 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:22:57 +00:00
Evan Hunt
5742027369 - nsec3 now allows an empty list of rrtypes; the unit test needed to
be informed of this
- both nsec and nsec3 now throw InvalidRdataText when encountering an
  unknown rrtype, rather than InvalidRRType (which was somewhat misleading)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1164 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 01:04:38 +00:00
JINMEI Tatuya
04af766e88 more tests for the sqlite3 data source.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1163 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 00:52:39 +00:00
JINMEI Tatuya
0e64cd53a6 propset
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1162 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 00:40:23 +00:00
JINMEI Tatuya
b1e4fa8f03 added a simple comparison test for DS
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1161 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-07 00:39:19 +00:00
JINMEI Tatuya
a679473633 added more sqlite3 data source tests.
these cover bugs of trac tickets #73 and #74 (currently commented out).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1160 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 22:43:09 +00:00
Evan Hunt
4f63a46a6a - add empty non-terminals to nsec3 test data
- fixed a bug in which NSEC3 parsing would fail if there were
  no rrtypes listed
- also, ignore exceptions when a listed type is not recognized


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1159 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 22:08:31 +00:00
Evan Hunt
62b5df9b65 - added a unit test for Nsec3Param.getHash()
- fixed a bug in the NSEC3 hashing algorithm


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1158 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 21:45:48 +00:00
Evan Hunt
fea84e8d9d - rebuild the sqlite3 unit test's test data with the new database schema
- add the case-insensitive test back into the sqlite3 unit test


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1157 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 18:52:32 +00:00
Evan Hunt
599d1d9b64 add COLLATE NOCASE to table schema so that lookups will be case insensitive
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1156 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 18:34:11 +00:00
Evan Hunt
575c53af14 - add NSEC3 loadzone test data
- fixed several bugs in NSEC3 logic


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1155 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 18:23:37 +00:00
JINMEI Tatuya
833d7f652d added new tests (incomplete) for the Sqlite3 data source
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1151 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 08:22:06 +00:00
JINMEI Tatuya
633ac6d3b6 consistency and style fixes
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1150 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 08:21:20 +00:00
JINMEI Tatuya
6fc524ce75 disable checking the rhash column (missing commit?)
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1149 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 08:11:33 +00:00
JINMEI Tatuya
fd4dcf08b9 - allow the Sqlite3 data source to init itself with a non default DB file
- fixed a TTL setting bug


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1148 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 07:56:09 +00:00
Evan Hunt
483bf3a2be - load NSEC3 records and associated RRSIGs into the nsec3 table
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1147 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 04:35:01 +00:00
Evan Hunt
17519890c6 oops, I broke the nsec3param unit test. fixed.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1146 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 03:10:21 +00:00
Evan Hunt
67801f23d6 checkpoint:
- refactored NSEC support
 - fixed bug in which NSEC records could be duplicated
 - added NSEC3 code -- please note NSEC3 is COMPLETELY untested


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1145 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 02:51:21 +00:00
JINMEI Tatuya
4ef47c4cb3 added some more tests for static data source
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1144 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-06 00:08:12 +00:00
JINMEI Tatuya
7b1d08acf1 used pimpl + in-class static data approach instead of relying on non local
static objects to minimize the risk of statitic initialization order fiasco.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1143 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-05 23:53:06 +00:00
JINMEI Tatuya
071aa1fbad added data source unit tests (so far major cases only)
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1142 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-05 23:51:58 +00:00