2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

23242 Commits

Author SHA1 Message Date
Tomek Mrugalski
643ced7b1a [4294] Compilation fix for unused parameter 2016-08-23 18:50:26 +02:00
Thomas Markwalder
180a0b201d [4294] Fixed a doxygen error 2016-08-18 06:54:58 -04:00
Thomas Markwalder
d619d5e38b [4294] More clean up 2016-08-17 09:48:32 -04:00
Thomas Markwalder
45d4cdc689 [4294] Minor cleanup 2016-08-16 15:23:33 -04:00
Thomas Markwalder
4a94a1f7b9 [4294] Memfile now supports IPv6 lease stats recounting
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
    - MemfileAddressStatsQuery6 - new class, Memfile derivation of
    the IPv6 statistical lease data query
    - Memfile_LeaseMgr::startAddressStatsQuery6() - new virtual
    method that creates and runs the IPv6 lease stats query

src/lib/dhcpsrv/memfile_lease_storage.h
    - Added non-unique index on subnet ID to Lease6Storage

src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
    TEST_F(MemfileLeaseMgrTest, recountAddressStats6) - new test
2016-08-16 14:15:25 -04:00
Thomas Markwalder
efbf437f6d [4294] PostgreSQL now supports IPv6 lease stats recounting
src/lib/dhcpsrv/pgsql_lease_mgr.h
src/lib/dhcpsrv/pgsql_lease_mgr.cc
    - Added TaggedStatement RECOUNT_LEASE6_STATS
    - PgSqlAddressStatsQuery6 - new class PgSql derivation of the IPv6
    statistical lease data query
    - PgSqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
    creates and runs the IPv6 lease stats query

src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
    TEST_F(PgSqlLeaseMgrTest, recountAddressStats6) - new test
2016-08-16 12:01:21 -04:00
Thomas Markwalder
6f56be5aa2 [4294] Unit tests and MySql now support IPv6 lease stat recounting
src/lib/dhcpsrv/cfg_subnets6.cc
    - CfgSubnets6::removeStatistics() - added removal of declined stats
    - CfgSubnets6::updateStatistics() - added call to recountAddressStats6()

src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
    - Added TaggedStatement RECOUNT_LEASE6_STATS
    - MySqlAddressStatsQuery6 - new MySql derivation of AddressStatsQuery6
    - MySqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
    creates and starts a MySqlAddressStatsQuery6

src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
    - GenericLeaseMgrTest::checkAddressStats4 renamed to checkAddressStats as
    it applies to either v4 or v6
    - GenericLeaseMgrTest::makeLease6() - new method which creates a minimal
    IPv6 lease and adds it to lease storage
    - GenericLeaseMgrTest::testRecountAddressStats6() - new method which
    checks IPv6 lease stats recounting

src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
    - TEST_F(MySqlLeaseMgrTest, recountAddressStats6) - new test
2016-08-16 11:13:17 -04:00
Thomas Markwalder
61bc7b004a [4294] Added abstract support for IPv6 lease stats recount to LeaseMgr
src/lib/dhcpsrv/lease_mgr.h
src/lib/dhcpsrv/lease_mgr.cc
    AddressStatsRow6 - new struct that contains a single row of IPv6 lease
    statistical data

    AddressStatsQuery6 - new base class for fulfilling the IPv6 statistical
    lease data query

    LeaseMgr::recountAddressStats6() - new method that recalculates per-subnet
    and global stats for IPv6 leases

    LeaseMgr::startAddressStatsQuery6() - new virtual method which creates
    then executes the IPv6 lease stats query
2016-08-15 13:57:13 -04:00
Thomas Markwalder
64c23c76ca [4294] PostgreSQL now supports IPv4 lease stats recount
src/lib/dhcpsrv/cfg_subnets4.cc
    CfgSubnets4::updateStatistics() - removed lease mgr instance check

src/lib/dhcpsrv/mysql_lease_mgr.cc
    Added "ORDER by subnet_id" to RECOUNT_LEASE4_STATS

src/lib/dhcpsrv/pgsql_lease_mgr.cc
    Added tagged statement RECOUNT_LEASE4_STATS
    PgSqlAddressStatsQuery4 - new class, PostgreSQL derivation of AddressStatsQuery4
    PgSqlLeaseMgr::startAddressStatsQuery4() - PostgreSQL impl of virtual method

src/lib/dhcpsrv/srv_config.cc -
    SrvConfig::updateStatistics() - Added LeaseMgr singleton check around
    calls subnet statistics updates

src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
    CfgMgrTest:
       ~CfgMgrTest() - now destroys LeaseMgr singleton
       startBackend(int family = AF_INET) -  new method to create memfile lease mgr

        TEST_F(CfgMgrTest, commitStats4)
        TEST_F(CfgMgrTest, commitStats6)
    - added call to startBackend()

src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
    TEST_F(PgSqlLeaseMgrTest, recountAddressStats4) - new test
2016-08-15 10:25:25 -04:00
Thomas Markwalder
a8f85f2508 [4294] Memfile and MySql now support recalulating IPv4 lease statistics
src/lib/dhcpsrv/cfg_subnets4.cc
    CfgSubnets4::removeStatistics()
    - added removal of all lease statistics per subnet, and global declined address
    stats

    CfgSubnets4::updateStatistics()
    - added call to LeaseMgr::recountAddressStats4

src/lib/dhcpsrv/lease.cc
src/lib/dhcpsrv/lease.h
    Replaces lease state constants with LeaseState enumeration.

src/lib/dhcpsrv/lease_mgr.cc
src/lib/dhcpsrv/lease_mgr.h
    struct AddressStatsRow4 - contains the content of one row of the IPv4
    lease statistical data result set

    class AddressStatsQuery4 - base class for constructing the IPv4
    lease statistical data result set for an IPv4 lease storage

    LeaseMgr::recountAddressStats4() -  new method which recalculates
    per-subnet and global stats for IPv4 leases

    LeaseMgr::startAddressStatsQuery4() - new virtual method that fetches
    the IPv4 lease statistical data result set

src/lib/dhcpsrv/lease_mgr_factory.h
src/lib/dhcpsrv/lease_mgr_factory.cc
    LeaseMgrFactory::haveInstance() - new static method which indicates
    whether or not the lease manager singleton exists

src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
    MemfileAddressStatsQuery4 - Derivation of AddressStatsQuery4, it constructs
    the IPv4 lease statistical data by iterating over IPv4 lease storage

    Memfile_LeaseMgr::startAddressStatsQuery4() - new virtual method which
    creates, starts, and returns a MemfileAddressStatsQuery4

src/lib/dhcpsrv/memfile_lease_storage.h
    Added an a per subnet_ID index to IPv4 storage

src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
    - Added RECOUNT_LEASE4_STATS query

    MySqlAddressStatsQuery4 Derivation of AddressStatsQuery4, it constructs
    the IPv4 lease statistical data by executing RECOUNT_LEASE4_STATS

    MySqlLeaseMgr::startAddressStatsQuery4() - new virtual method which
    creates, starts, and returns a MySqlAddressStatsQuery4

src/lib/dhcpsrv/tests/alloc_engine_utils.cc
    AllocEngine6Test::AllocEngine6Test()
    AllocEngine4Test::AllocEngine4Test()
    - moved lease mgr create up above configuration commit

src/lib/dhcpsrv/tests/cfg_db_access_unittest.cc
     ~CfgMySQLDbAccessTest() - added destruction of lease manager singleton,
    otherwise subsequent tests can fail

src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
    GenericLeaseMgrTest::checkStat() - new method for comparing a stat
    GenericLeaseMgrTest::checkAddressStats4() - new method for comparing a list
    of stats
    GenericLeaseMgrTest::makeLease4() - new method for making a minimal lease
    GenericLeaseMgrTest::testRecountAddressStats4() - new method which tests
    a lease manager's ability to recalculate the IPv4 lease statistics

src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
    TEST_F(MemfileLeaseMgrTest, recountAddressStats4) - new test which tests
    Memfile_LeaseMgr's ability to recalculate IPv4 lease statistics

src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
    TEST_F(MySqlLeaseMgrTest, recountAddressStats4) - new test which tests
    MySqlLeaseMgr's ability to recalculate IPv4 lease statistics
2016-08-12 14:02:35 -04:00
Shawn Routhier
901a83c6b3 [4511] add commit number to change log 2016-08-03 13:04:05 -07:00
Shawn Routhier
0387eedc5f [trac4511] Add description of the forensic log hooks configuration to admin guide 2016-08-03 12:58:27 -07:00
Shawn Routhier
0bb39840a3 [trac4511] Update per review comments 2016-08-03 12:32:14 -07:00
Shawn Routhier
8fd967a483 [trac4511] Add description of the legal log hooks configuration and use 2016-07-31 22:21:56 -07:00
Thomas Markwalder
71a38f0279 [master] Added ChangeLog entry 1145 for #4277. 2016-07-26 09:07:57 -04:00
Thomas Markwalder
ac1eaa1026 [master] Addes support for Host Reservations to PostgreSQL backend
Merge branch 'trac4277'
2016-07-26 08:03:11 -04:00
Thomas Markwalder
018e92a042 [4277] Addressed review comments
src/lib/dhcpsrv/pgsql_host_data_source.h
    - added comment about v6 Duplicate constraint when added host reservations
2016-07-26 08:01:09 -04:00
Marcin Siodelski
0c63a29702 [master] Added ChangeLog entry for pull request #23. 2016-07-26 06:24:38 +02:00
Marcin Siodelski
ec6cfeb9e5 [master] Updated AUTHORS file with author of pull request #23. 2016-07-26 06:22:22 +02:00
Marcin Siodelski
4216a4bedf [github23] Corrected setting port number for DHCPv4 server.
For the DHCPINFORM case set destination port 68 if:
- direct message sent without ciaddr,
- ciaddr present

Also updated unit test to verify port number for the directly
sent DHCPINFORM without ciaddr.
2016-07-26 06:01:59 +02:00
Michal Humpula
bdf81033b6 [github23] Select client port for DHCPINFORM message. 2016-07-26 06:01:59 +02:00
Tomek Mrugalski
7e2d2f21c6 [4277] Added several @todos and fixed formatting. 2016-07-25 20:04:20 +02:00
Francis Dupont
9c77c5bc52 [master] Updated git tag 2016-07-15 14:54:35 +02:00
Francis Dupont
fe8cb64ade [master] Finished merge of trac4273 (DHCP4o6 user doc) 2016-07-15 14:53:38 +02:00
Francis Dupont
1b46438530 [4273] Italic and indent 2016-07-15 14:48:33 +02:00
Thomas Markwalder
cac472f52a [4277] Fixed tagged_statements name collision
Wrapped declaration of tagged_statements[] in pgsql_host_data_source.cc
and mysql_host_data_source.cc in anonymous namespace.  They collide
otherwise.
2016-07-14 16:35:12 -04:00
Thomas Markwalder
c941012d8e [4277] Added PostgreSQL HR Managment section to developer's guide
src/lib/dhcprsrv/images/pgsql_host_data_source.svg
    - New class diagram for PgSqlHostDataSource

doc/Doxyfile
    - Added src/lib/dhcprsrv/images to IMAGE_PATH

src/lib/dhcpsrv/Makefile.am
    - Added images/pgsql_host_data_source.svg to EXTRA_DIST

src/lib/dhcpsrv/libdhcpsrv.dox
    - Added subsection postgreSQLHostMgr

src/lib/dhcpsrv/pgsql_connection.h
src/lib/dhcpsrv/pgsql_exchange.h
    - Minor cleanup
2016-07-14 09:09:03 -04:00
Thomas Markwalder
15b51b6229 [4277] Addressed bulk of review comments
src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
    - Added PgSqlBasicsTest test fixture class and tests which exercise all of
    the PostgreSQL data types we currently use with round-trip database writes
    and reads

src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
    - Moved PgSqlResult function impls from .h
    - Added exception safe implementation of getColumnLabel() to PgSqlResult

src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
    - PsqlBindArray::add() variants which accept raw pointers now throw
    if the pointer is NULL
    - PgSqlExchange::getColumnLabel() is now a wrapper around PgSqlResult method

src/lib/dhcpsrv/pgsql_host_data_source.h
src/lib/dhcpsrv/pgsql_host_data_source.cc
     - Commentary clean up

src/lib/dhcpsrv/pgsql_lease_mgr.cc
     - Commentary clean up
2016-07-14 07:34:06 -04:00
Shawn Routhier
4f94deb314 [master] Add git tag for change log 1142 2016-07-13 12:22:17 -07:00
Shawn Routhier
dee442a64f [master] Uncomment the example column from some rows in the list of classifciation values 2016-07-13 12:20:50 -07:00
Shawn Routhier
314b11b4a2 [trac4273] Minor typos in port description 2016-07-11 12:59:19 -07:00
Francis Dupont
397d745be7 [4273] Addressed comments 2016-07-09 11:08:30 +02:00
Francis Dupont
62c9410057 [master] Merged trac4531 (test -> expr for <) 2016-07-09 09:51:33 +02:00
Francis Dupont
7cdfb2fea1 [4531] Patrick -> Patrik 2016-07-09 09:47:17 +02:00
Francis Dupont
e831000b90 [4531] Updated AUTHORS 2016-07-09 09:45:46 +02:00
Marcin Siodelski
1c1a3c021c [master] Added ChangeLog entry for #4497. 2016-07-08 23:01:52 +02:00
Marcin Siodelski
e50d2ebe99 [master] Merge branch 'trac4497_rebase' 2016-07-08 22:34:59 +02:00
Marcin Siodelski
978830d5ad [4497] Fixed inefficient setting of the Pkt4o6 flag. 2016-07-08 22:19:52 +02:00
Francis Dupont
75a8350485 [master] Fixed rights of non-executable regular files 2016-07-08 20:38:15 +02:00
Francis Dupont
164a56b0de [master] Merged trac4245 (server unicast option doc) 2016-07-08 19:17:59 +02:00
Francis Dupont
c6f931934d [4497] spelling 2016-07-08 19:04:23 +02:00
Marcin Siodelski
0a037d60ba [4497] Enable retrieved options copying for remaining DHCPv6 hooks.
buffer6_send and lease6_release (PD case) hook points didn't set
copying retrieved options flag for a packet passed to callouts.
2016-07-08 10:51:53 +02:00
Marcin Siodelski
c97c2e0e7c [4497] Enable retrieved options copying for DHCPv4o6 case. 2016-07-08 10:51:21 +02:00
Marcin Siodelski
d11a96e300 [4497] Extended Pkt4o6 to support setCopyRetrievedOptions. 2016-07-08 09:47:46 +02:00
Francis Dupont
5dee09f6fb [4497] Spelling, no \n at end of .gitignore, etc 2016-07-08 07:50:19 +02:00
Francis Dupont
9cc292e608 [4497] Spelling 2016-07-08 07:50:19 +02:00
Marcin Siodelski
1646b7df7c [4497] Fixed a couple doxygen issues. 2016-07-08 07:50:19 +02:00
Marcin Siodelski
a38cb53511 [4497] Udated doxygen about copying retrieved options in hooks. 2016-07-08 07:50:19 +02:00
Marcin Siodelski
f6f450765e [4497] Updated comments in DHCPv6 hooks unit tests. 2016-07-08 07:50:19 +02:00
Marcin Siodelski
2d8f61251d [4497] Updated copyright dates. 2016-07-08 07:50:19 +02:00