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
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
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
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
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
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.
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