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

474 Commits

Author SHA1 Message Date
Francis Dupont
5b8e4c6da6 [#720] Moved to compatibility flag 2023-03-13 14:52:20 +01:00
Thomas Markwalder
b2a1e0f77f [#2739] Consistently calculate v6 lease lifetimes
Added a ChangeLog entry

src/lib/dhcpsrv/alloc_engine.cc
    AllocEngine::reuseExpiredLease(Lease6Ptr...)
    AllocEngine::extendLease6()
    - replaced explicit lifetime logic with call to getLifetimes6()

src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
    TEST_F(AllocEngine6Test, classReuseExpiredLease6)
    TEST_F(AllocEngine6Test, renewClassLeaseLifetime) - new tests

src/lib/dhcpsrv/tests/alloc_engine_utils.*
    AllocEngine6Test::simpleAlloc6Test() - now accepts option class defintion
2023-02-22 15:00:13 -05:00
Andrei Pavel
ae32698efe Apply 2 suggestion(s) to 2 file(s) 2023-02-13 13:48:36 -05:00
Thomas Markwalder
9b004b6c5d [#2631] Revised comment
src/lib/dhcpsrv/alloc_engine.cc
2023-02-13 13:48:36 -05:00
Thomas Markwalder
2ec065a08a [#2631] Global reserved addresses must be feasible
kea-dhcp<4/6> both now enforce globally reserved addresses
to be within the selected subnet/shared-network

Added a ChangeLog entry

doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
    Updated global reservation commmentary

src/lib/dhcpsrv/alloc_engine.cc
    AllocEngine::allocateGlobalReservedLeases6() - modified to enforce
    address feasibility/subnet reselect

    AllocEngine::labelNetworkOrSubnet() - new convenience method for logging

    hasAddressReservation() - modified to enforce
    address feasibility/subnet reselect

src/lib/dhcpsrv/alloc_engine_messages.mes
    New log messages:
    ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS
    ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine_utils.*
src/bin/dhcp4/tests/host_unittest.cc
src/bin/dhcp6/tests/host_unittest.cc
    New and updated tests
2023-02-13 13:48:36 -05:00
Francis Dupont
28bf1c1b3a [#2738] Checkpoint: UTs to do 2023-02-08 16:52:03 +01:00
Francis Dupont
0c99d67dbc [#2682] Addressed comments 2023-02-07 09:42:17 +01:00
Francis Dupont
06ec4d525d [#2682] Added a try-catch in reclaimExpiredLeases* 2023-02-07 09:32:04 +01:00
Wlodek Wencel
e0f96268f8 [#2732] release changes 2023-01-23 19:18:49 +01:00
Razvan Becheriu
b6f0aaa01e [#1958] addressed review comments 2023-01-18 17:12:01 +02:00
Razvan Becheriu
3478e51fd5 [#1958] addressed review comments 2023-01-18 17:12:01 +02:00
Razvan Becheriu
a6829418a7 [#1958] added 3 pass for PD (exact, smaller and greater prefix len) 2023-01-18 17:12:01 +02:00
Marcin Siodelski
3bfcf6b85a [#2348] Addressed review comments
- Remove unused AllocEngine ctor parameter
- Simplify locks
- Use default keyword instead of an empty implementation in dtors
- Fix typos
2022-11-21 08:52:03 +01:00
Marcin Siodelski
63b09a9bc2 [#2348] Removed type from engine constructor 2022-11-21 08:52:02 +01:00
Marcin Siodelski
9fb382f676 [#2348] Allocator is a subnet property 2022-11-21 08:52:02 +01:00
Marcin Siodelski
c599f02fe0 [#2348] Moved allocators outside the engine 2022-11-21 08:52:02 +01:00
Francis Dupont
2f57d9c4ad [#2596] Checkpoint: unit tests to do 2022-11-16 23:48:28 +01:00
Francis Dupont
72fa5ea938 [#2596] Checkpoint for #2595 update 2022-11-16 23:48:27 +01:00
Razvan Becheriu
80e8c44897 [#248] template classes can add regular classes 2022-10-24 17:49:34 +00:00
Razvan Becheriu
5da3798bf3 [#248] using same add/get class interface 2022-10-24 17:49:34 +00:00
Razvan Becheriu
033cc7bd7c [#248] added template classes 2022-10-24 17:49:34 +00:00
Francis Dupont
888f1f0296 [#2587] Done (note the doc should be updated) 2022-10-15 20:39:56 +02:00
Francis Dupont
ead7df0ea6 [#2588] Updated code and unit tests 2022-10-12 23:53:16 +02:00
Francis Dupont
8aa556d04f [#2573] Applied Thomas's proposal 2022-10-04 13:05:12 +02:00
Francis Dupont
fcdab438f7 [#2573] Extended the lease extended info 2022-10-04 13:05:12 +02:00
Dan Theisen
dd62bd50de [#2419] Make suggested changes from Code Review 2022-07-08 12:26:44 -07:00
Dan Theisen
a7260a26c2 [#2419] Fix statistics (add v4-reservation-conflicts) unit tests for dhcp4 2022-07-08 12:18:55 -07:00
Dan Theisen
e53b1a434f [#2419] Begin adding stats to track HR assignment conflicts 2022-07-08 12:18:54 -07:00
Dan Theisen
040363cbee [#2395] Make ALLOC_ENGINE_V6_ALLOC_FAIL_SUBNET log message format consistent with V4 2022-06-13 15:57:28 +00:00
Dan Theisen
3e4ab418de [#2395] Clarify ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET log message 2022-06-13 15:57:28 +00:00
Marcin Siodelski
487743f1dd [#2409] Fix wrong subnet-id assignment
Fix an issue in the allocation engine resulting in wrong subnet assignment
after the lease renew.
2022-05-17 15:07:11 +02:00
Francis Dupont
06be19c83e [#2249] Checkpoint: doc to finish 2022-03-14 20:20:37 +02:00
Andrei Pavel
12a62ae17d
[#2320] release changes 2022-02-21 10:36:48 +02:00
Razvan Becheriu
4726e9ea0c [#2054] added counters for subnets as well 2022-02-17 19:50:29 +02:00
Razvan Becheriu
163efdff92 [#2054] added stats counter for allocation failures 2022-02-17 19:50:29 +02:00
Razvan Becheriu
cd5f61195a [#2036] make host reservations lookup before lease lookup configurable 2022-02-04 16:35:23 +02:00
Thomas Markwalder
49fe9fbf35 [#1584] Addressed minor review comments
modified:
    src/bin/dhcp4/dhcp4_srv.cc
    src/bin/dhcp4/tests/dora_unittest.cc
    src/bin/dhcp4/tests/hooks_unittest.cc
    src/lib/dhcpsrv/alloc_engine.cc
2021-10-21 13:32:16 -04:00
Thomas Markwalder
65d31e57b2 [#1584] Suppress v4 NAKs for unknown addresses
kea-dhcp4 no longer NAKs when the client DHCPREQUESTs
an address that the server does not know.

Added ChangeLog entry

src/bin/dhcp4/dhcp4_messages.*
    DHCP4_UNKNOWN_ADDRESS_REQUESTED - new log message

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::assignLease() - added logic to drop NAKs when
    the address is not managed the server.

src/bin/dhcp4/tests/dora_unittest.cc
src/bin/dhcp4/tests/hooks_unittest.cc
src/bin/dhcp4/tests/out_of_range_unittest.cc
    updated tests

src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::ClientContext4 - added unknown_requested_addr_ flag
    AllocEngine::requestLease4(AllocEngine::ClientContext4& ctx) - sets
    unknown_requested_addr_ flag
2021-10-21 13:32:16 -04:00
Thomas Markwalder
f8ca02c1fd [#1710] Addressed review comments
ChangeLog - amended entry to mention CB

doc/sphinx/arm/dhcp6-srv.rst
    updated CB supported paramters table

src/lib/dhcpsrv/alloc_engine.cc
    minor clean up
2021-08-20 08:44:05 -04:00
Thomas Markwalder
d98770b09c [#1710] Added lifetimes to v6 client classes
kea-dhcp6 client classes now support valid and preferred
lifetime triplets.  Need to update ARM and CB yet.

/doc/examples/kea6/all-keys.json
    Updated

/src/bin/dhcp6/dhcp6_lexer.ll b/src/bin/dhcp6/dhcp6_lexer.ll
    Added preferred and valid lifetime parameters to client class

/src/bin/dhcp6/dhcp6_parser.yy
    Added preferred and valid lifetime parameters to client class

src/bin/dhcp6/tests/config_parser_unittest.cc
    TEST_F(Dhcp6ParserTest, clientClassValidPreferredLifetime)  - new test

/src/bin/dhcp6/tests/parser_unittest.cc
    Added use of EXPECT_NO_THROW_LOG to ease finding JSON errors

/src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::getLifetimes6() - new function
    Lease6Ptr AllocEngine::createLease6() - calls new function

/src/lib/dhcpsrv/client_class_def.*
/src/lib/dhcpsrv/parsers/client_class_def_parser.cc
    ClientClassDef - added support for preferred lifetime triplet

/src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
    TEST_F(AllocEngine6Test, getValidLifetime)
    TEST_F(AllocEngine6Test, getPreferredLifetime) - new tests

/src/lib/dhcpsrv/tests/client_class_def_parser_unittest.cc
    TEST_F(ClientClassDefParserTest, preferredLifetimeTests) - new test

/src/lib/dhcpsrv/tests/client_class_def_unittest.cc
    updated tests
2021-08-20 08:43:29 -04:00
Tomek Mrugalski
4448a4ef75 [#1915] failure to allocate message is more verbose 2021-06-25 18:56:53 +03:00
Razvan Becheriu
bd91e0b252 [#1680] consistent order of parameters in hook points 2021-05-05 20:12:17 +03:00
Thomas Markwalder
e3b16f4cbf [#1635] Addressed review comments
Changes were cosmetic, no fucntional changes required.

Modified:
doc/sphinx/arm/dhcp4-srv.rst
src/bin/dhcp4/tests/config_parser_unittest.cc
src/lib/cc/simple_parser.h
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/client_class_def.cc
src/lib/dhcpsrv/client_class_def.h
src/lib/dhcpsrv/parsers/shared_network_parser.cc
src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
src/lib/dhcpsrv/tests/client_class_def_parser_unittest.cc
2021-02-19 13:21:59 -05:00
Thomas Markwalder
6dffe6c360 [#1635] Use option 51 in conjunction with class triplet
Added a ChangeLog entry

doc/examples/kea4/all-keys.json
doc/sphinx/arm/dhcp4-srv.rst
    Updated doc

src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::getValidLft() - revamped to apply use class
    triplet with option 51

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
    TEST_F(AllocEngine4Test, getValidLft4)  - udpated
    to match new logic
2021-02-19 13:21:59 -05:00
Thomas Markwalder
c692edf1aa [#1635] V4 Allocation now uses class values for valid lifetime
src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::getValidLft(ctx4) - new method which returns
    the appropriate value for valid-leasetime based on the
    context content

    AllocEngine::createLease4
    AllocEngine::updateLease4Information() - call getValidLft()

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
    TEST_F(AllocEngine4Test, getValidLft4)  - new test
2021-02-19 13:21:17 -05:00
Marcin Siodelski
5d4d881928 [#1701] Addressed alloc engine review issues
Reduced the number of new log messages to avoid flooding the log with
warnings. For a shared network we now only log the number of subnets from
which the engine attempted to allocate a lease and the number of subnets
in which no pools were available.
2021-02-19 10:48:44 +01:00
Marcin Siodelski
a4e8b97267 [#1701] Improved v6 alloc fail messages
This is the corresponding change to the previous v4 change.
2021-02-19 10:46:55 +01:00
Marcin Siodelski
30432d6a64 [#1701] Improved v4 alloc failure logs
In case of lease allocation failure, the allocation engine now logs:
- which shared network the client belongs to
- which subnet (if not shared network) the client belongs to
- which subnets were tried
- for which subnets there were allocation attempts
- for which subnets there were no allocation attempts
2021-02-19 10:46:55 +01:00
Andrei Pavel
c53e135833
[#1656] 1.9.4 release: update copyrights 2021-01-25 13:52:09 +02:00
Francis Dupont
0d0ca1d54b [#1418] Finished rebase, did CB 2021-01-11 16:05:46 +01:00