2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 20:47:48 +00:00

250 Commits

Author SHA1 Message Date
Marcin Siodelski
8fa9106272 [3673] Handle overflows in the time conversions in the MySQL backend. 2015-03-04 13:32:18 +01:00
Marcin Siodelski
c96df51663 [3556] Updated copyright headers. 2014-12-04 14:47:21 +01:00
Tomek Mrugalski
1ea3e6c973 [3556] Reenabled one disabled test (and fixed MySQL to actually pass it) 2014-11-06 19:40:25 +01:00
Tomek Mrugalski
ab0365c68d [3556] HWAddr support in MySQL implemented. 2014-11-06 19:36:46 +01:00
Tomek Mrugalski
b572132b06 [3555] MySQL update after Lease4->hwaddr_ type changed. 2014-10-21 19:36:53 +02:00
Mukund Sivaraman
7607200420 [1283] Remove toText() calls where IOAddress should be used directly 2014-01-07 11:32:31 +05:30
Marcin Siodelski
672d49074e [2940] Moved the Memfile backend tests to a generic class. 2013-11-15 12:03:21 +01:00
Tomek Mrugalski
a26a75c948 [3149] Lease6::LeaseType and Pool::PoolType unified. 2013-09-18 15:44:48 +02:00
Thomas Markwalder
923a40c230 [3147] Addressed review comments.
Minor changes to logging messages, unit tests, and commentary.
2013-09-18 06:06:37 -04:00
Thomas Markwalder
91c0c0605d [3147] Implemented use of lease type in MySQL for IPv6 lease queries
Added support for lease type discrimination in IPv6 lease
operations in MySQL backend used by DHCP6, dhcpsrv/mysql_lease_mgr
2013-09-13 10:05:28 -04:00
Tomek Mrugalski
0b0bb4a278 [3146] getLease6() renamed to getLeases6() 2013-09-06 19:30:35 +02:00
Tomek Mrugalski
681def2806 [3146] getLease6 renamed to getLeases6(), single lease getLease6() added 2013-09-06 18:16:50 +02:00
Tomek Mrugalski
95729b096e [3146] getLease6() methods now have extra param: LeaseType 2013-09-06 14:51:59 +02:00
Marcin Siodelski
7feab5bbe6 [3084] Addressed review comments. 2013-08-30 16:18:40 +02:00
Marcin Siodelski
f09a4f68f8 [3084] Use FQDN data from the lease database to create lease instance. 2013-08-27 13:36:00 +02:00
Marcin Siodelski
879bf7b43d [3084] Modified MySQL bind statements to include FQDN data.
Also, included FQDN fields in the MySQL script creating database.
2013-08-26 17:30:56 +02:00
Thomas Markwalder
cac02e9290 [master] Merge branch 'trac2837' always use STRICT_SQL mode in
mysql_lease_mgr.
2013-04-09 15:16:32 -04:00
Thomas Markwalder
2b7e75de16 [2837] Addressed review comments. 2013-04-09 06:55:06 -04:00
Tomek Mrugalski
4972675716 [master] Merge branch 'trac2723' (too short/null DUIDs handing)
Conflicts:
	ChangeLog
	src/lib/dhcpsrv/mysql_lease_mgr.cc
2013-03-28 16:17:47 +01:00
Thomas Markwalder
ab624f466e [2837] Changed mysql to enforce STRICT mode
Changes:
 - hwaddr.h - added MAX_HWADDR_LEN
 - hwaddr.cc - modified constructor to throw InvalidParameter
            if input address is too big
 - hwaddr_unittest.cc - added tests for new constructor throws

 - lease_mgr.h - removed HWADDR_MAX
 - mysql_lease_mgr.cc - added logic to set SQL mode to STRICT
 - tests/mysql_lease_mgr_unittest.cc - modified tests that were
    failing on STRICT mode, to expect exceptions.
2013-03-15 14:19:42 -04:00
Thomas Markwalder
4813e06cf4 [2825] Removed "mysql" directory prefix from #include statements.
The include path for MySQL includes is accurately set by mysql_config.
2013-03-14 08:50:20 -04:00
Jeremy C. Reed
72b8ac6172 [master] various more typo and misspelling fixes
Some slight grammar changes.
Mostly in comments, but some for api docs.
Changes a isc_throw output too.

Reviewed via jabber.
2013-03-08 10:32:43 -06:00
Stephen Morris
b11b84e52d [2821] Updated documentation related to MySqlHolder class. 2013-03-07 23:00:23 +00:00
Jelte Jansen
e58c2fd32c [2821] Move MySqlHolder to header, and use as member
Half-related change, if available, call mysql_library_end() at the end of the unit test run
2013-03-07 15:48:51 +01:00
Tomek Mrugalski
a043d8ecda [2723] Changes after review. 2013-03-07 15:21:00 +01:00
Jelte Jansen
21dae0aa02 [2821] Small memory leak issue in MySQLLeaseMgr constructor
the mysql lease manager wouldn't close the mysql database immediately if initialization failed at certain points.

This proposed fix is not entirely complete; it would probably be better to either use such a holder class as the member, or to slightly clean it up so that the return value from release() can be given to mysql_ (and therefore use the holder in the construction code instead of mysql_), but I did not want to touch too much existing code at this point.
2013-02-25 17:22:48 +01:00
Tomek Mrugalski
6cbb6ed662 [2723] Test for lease4 with null client-id added, some fixes in MySQL. 2013-02-21 16:50:59 +01:00
Tomek Mrugalski
b5e2be95d2 [2697] Another fix for empty client-id, this time in MySQL LeaseMgr 2013-02-07 16:58:41 +01:00
Tomek Mrugalski
6278daf2fc [master] Merge branch 'trac2320' (DHCPv4 allocation engine)
Conflicts:
	ChangeLog
	src/bin/dhcp4/config_parser.cc
	src/bin/dhcp6/config_parser.cc
	src/lib/dhcpsrv/lease_mgr.cc
	src/lib/dhcpsrv/lease_mgr.h
	src/lib/dhcpsrv/memfile_lease_mgr.cc
	src/lib/dhcpsrv/subnet.cc
	src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
2013-01-10 16:32:24 +01:00
Tomek Mrugalski
32e13fbffa [2320] Allocation Engine for IPv4 implemented 2012-12-28 17:43:13 +01:00
Stephen Morris
b075676335 [2524] Add logging to configuration manager 2012-12-18 13:11:17 +00:00
Stephen Morris
46cf8771c2 [2524] Added commit and rollback trace messages 2012-12-18 12:35:43 +00:00
Stephen Morris
593eacf16f [2524] Add logging messages to memory file database code
Also make the hardware address to string function common to both
database modules.
2012-12-18 12:28:39 +00:00
Stephen Morris
c55cdfd631 [2524] Add logging to lease manager factory and MySQL lease manager 2012-12-14 22:19:31 +00:00
Stephen Morris
03b92733bf [2546] Unify deleteLease4() and deleteLease6() into a single deleteLease() 2012-12-10 11:21:24 +00:00
Stephen Morris
084a166845 [2546] Remove LeaseMgr::getLease4(address, subnetid)
As the address is th eprimary key of the table, there can only ever
be at most one lease in the database with a given address.  Additional
selection by subnet ID is not needed.
2012-12-10 10:13:53 +00:00
Stephen Morris
5c9dba4001 [master] Remove indirection in defining size of arrays
cppcheck was complaining about what was effectively:
const int A = 6; const int B = A; std::string array[b];

Changing this to
const int B = 6; std::string array[b];

... works
2012-12-07 20:25:25 +00:00
Stephen Morris
8f6903dc06 [2404] Updated comments etc. 2012-12-04 11:32:08 +00:00
Stephen Morris
495d4e2f69 [2404] More changes as a result of review
Including:
* Updates to comments etc.
* Addition of Lease4::operator==() (and associated unit tests)
2012-12-03 15:35:36 +00:00
Stephen Morris
ef364ccb84 [2404] First set of changes as a result of review
* Corrections of miscellaneous typos in comments
* Update database version to 1.0
* Handling of truncation while fetching data from the database
2012-11-30 15:49:42 +00:00
Stephen Morris
46cfa07792 [2404] Further refactoring and a bit of simplification.
Also, included dhcpsrv in the list of directories searched by Doxygen.
2012-11-26 19:17:27 +00:00
Stephen Morris
5b1850bbc2 [2404] Tidying up and refactoring the code 2012-11-23 18:23:21 +00:00
Stephen Morris
3b2c2c14fb [2404] Add ability to update an IPv4 lease 2012-11-23 14:08:00 +00:00
Stephen Morris
a08894f451 [2404] Add method to get lease4 by client ID and subnet ID 2012-11-23 13:48:42 +00:00
Stephen Morris
7e6602a873 [2404] Add get lease4 by client ID 2012-11-23 12:47:40 +00:00
Stephen Morris
3eab2458f1 [2404] Add method to get lease4 by hardware address & subnet ID 2012-11-23 12:23:17 +00:00
Stephen Morris
59c65b476b [2404] Now able to get IPv4 leases by hardware address 2012-11-23 12:05:55 +00:00
Stephen Morris
af71689ee4 [2404] Add getLease4(const IOAddress&, SubnetId)
Add ability to select IPv4 leases by address and Subnet ID.
2012-11-21 19:38:26 +00:00
Stephen Morris
6107151348 [2404] Basic Lease4 functionality working 2012-11-21 12:44:18 +00:00
Stephen Morris
d2551c3b2b [2475] Split dhcp files into dhcp and dhcpsrv directories 2012-11-16 11:19:19 +00:00