The DHCPv6 server now supports the case when client classes are specified
in the host reservation and can be used to influence the pool selection
within a top level subnet.
If there are any classes in the host reservations, instead of clearing all
of the classes, remove the ones that are definede in the config. Then,
evaluate them again taking into account reserved ones.
The DHCPv4 server now takes into account client classes specified in
gobal reservations to select a subnet and/or pool for allocation within
a shared network.
This function was added to the ClientContext4 for the DHCPv4 server to be
able to quickly check if there are any global host reservations present
and if the reservations contain client classes which could be possibly
used for leases allocation.
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::allocateUnreservedLease4() - rather than first testing for a
host reservation and then looking for an existing lease, we reverse the
order, thus worrying about HRs only if there is no existing lease.
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
TEST_F(CSVLeaseFile4Test, embeddedEscapes) - new test
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
TEST_F(CSVLeaseFile6Test, embeddedEscapes) - new test
src/lib/util/csv_file.cc
CSVRow::escapeCharacters() - now automatically also escapes
first char of escape_tag to preserve input that happens to match
escape tag
src/lib/util/tests/csv_file_unittest.cc
TEST(CSVRowTest, escapeUnescape) - added embedded escape tests
plus misc clean up
Commas in hostname and user-context columns are now escaped as
"," when written out, and unescaped when read back in.
src/lib/util/csv_file.*
CSVRow::escapeCharacters()
CSVRow::unescapeCharacters()
CSVRow::readAtEscaped()
CSVRow::writeAtEscaped() - new functions
CSVRow::parse() - replaced boost::split() faster, simplified parsing
src/lib/util/tests/csv_file_unittest.cc
TEST(CSVRowTest, escapeUnescape) - new test
updated other tests
src/lib/dhcpsrv/csv_lease_file4.cc
CSVLeaseFile4 now uses CSVRow::writeAtEscaped() and CSVRow::readAtEscaped() for
hostname and user-context columns
src/lib/dhcpsrv/csv_lease_file6.cc
CSVLeaseFile6 now uses CSVRow::writeAtEscaped() and CSVRow::readAtEscaped() for
hostname and user-context columns
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
TEST_F(CSVLeaseFile4Test, embeddedCommas) - new test
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
TEST_F(CSVLeaseFile6Test, embeddedCommas) - new test
src/bin/agent/tests/ca_controller_unittests.cc
TEST_F(CtrlAgentControllerTest, shutdown) - new test
src/lib/process/daemon.h
Daemon::shutdown() restored to virtual
Other Minor cleanups