src/bin/dhcp4/ctrl_dhcp4_srv.cc
Removed setting D2ClientCfg fetch function
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
ddns-send-updates
ddns-override-no-update
ddns-override-client-update
ddns-replace-client-name
ddns-generated-prefix
ddns-qualifying-suffix
- added to DHCP4,SHARED_NETWORK,SUBNET4
hostname-char-set
hostname-char-replacement
- added to SHARED_NETWORK,SUBNET4
src/bin/dhcp4/dhcp4_srv.cc
Dhcpv4Srv::processClientFqdnOption()
Dhcpv4Srv::processHostnameOption()
Dhcpv4Srv::assignLease()
Use scoped DdnsParams from context to make decisions, pass
into D2ClientMgr functions, and supply hostname sanitizer
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server()
- use SrvConfig::moveDdnsParams() to move dhcp-ddns parameters
- handle new "ddns-" globals
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/d2_unittest.cc
src/bin/dhcp4/tests/dhcp4_test_utils.cc
src/bin/dhcp4/tests/fqdn_unittest.cc
src/bin/dhcp4/tests/get_config_unittest.cc
Updated and new tests
src/bin/dhcp4/json_config_parser.*
Moved global merge logic into SrvConfig
src/lib/dhcpsrv/srv_config.*
SrvConfig::merge(const ConfigBase& other) - now calls protocol
specific merge methods
SrvConfig::merge4() - new method for v4 merges
SrvConfig::mergeGlobals4() - new method for merging v4 globals
src/lib/dhcpsrv/tests/srv_config_unittest.cc
TEST_F(SrvConfigTest, mergeGlobals4) - new test
src/bin/dhcp4/tests/config_backend_unittest.cc
Added DISABLED tests for option definitions and options.
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/json_config_parser.cc
Added two log messages
Server fetches config, populates external SrvConfig and invokes
merge. libdhcpsrv still lacks merging of globals,opt defs,options,
and shared networks.
src/bin/dhcp4/json_config_parser.*
configureDhcp4Server() - restored call to databaseConfigFetch()
databaseConfigFetch(const SrvConfigPtr& srv_cfg) - completed
implementation, now fetches external config and invokes merge
addGlobalsToConfig()
handleExplicitGlobal()
handleImplicitGlobal() - new functions for populating external
config globals with backend globals
src/bin/dhcp4/tests
config_backend_unittest.cc - new file that tests config fetch and merge
src/lib/cc/stamped_value.*
StampedValue::toElement(Element::types elem_type) - new method for
creating Elements from StampedValues
src/lib/cc/tests/stamped_value_unittest.cc
TEST(StampedValueTest, toElement) - new test
src/lib/dhcpsrv/testutils/test_config_backend.h
TestConfigBackend() - fixed host_ assignment
doc/guide/dhcp4-srv.xml
Updated user guide with new parameters and details on rules
src/lib/cc/data.cc
DoubleElement::toJSON(std::ostream& ss) - modified to ensure whole number
values are suffixed with ".0"
src/lib/utils/doubles.h - new file
provides a function for equating doubles within a given tolerance
src/lib/cc/simple_parser.*
SimpleParser::getDouble() - new method for fetching real number
parameters as DoulbeElements
src/lib/dhcpsrv/network.*
Added members and support for new paramters to Network4:
calculate_tee_times_, t1_percent_, t2_percent_
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
Added support for new parameters to Subnet4ConfigParser
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
Added parser support for calculate-tee-times, t1-percent, and t2-percent
src/bin/dhcp4/dhcp4_srv.*
Dhcpv4Srv::setTeeTimes(lease, subnet, resp) - new method for
determining T1 adn T2 values
src/bin/dhcp<4/6>/ctrl_dhcp<4/6>_srv.cc
ControlledDhcpv<4/6>Srv::processConfig() - now calls
IfaceMgr::configureDHCPPacketQueue
src/bin/dhcp<4/6>/dhcp<4/6>_parser.yy
dhpc-queue-control parsing updated to enforce
enable-queue/queue-type rules
src/bin/dhcp<4/6>/tests/config_parser_unittest.cc
TEST_F(Dhcp<4/6>ParserTest, dhcpQueueControl)
TEST_F(Dhcp<4/6>ParserTest, dhcpQueueControlInvalid)
src/lib/dhcp/iface_mgr.*
IfaceMgr
- closeSockets() - now calls stopDHCPReceiver
- openSockets<4/6>() - now calls startDHCPReceiver
- receive<4/6>Indirect() - new function which monitors receiver
thread watch sockets, reads DHCP packets from queue
- receive<4/6>Direct() - new function which monitors and reads DHCP
packets from interface sockets directly
- receive<4/6>() - rewritten to call receive<4/6>Indirect
if receiver thread is running, otherwise it calls receive<4/6>Direct
- configureDHCPPacketQueue() - new function which either enables queuing
by creating a new packet queue, or disables it by destroying the
existing queue
src/lib/dhcp/packet_queue_mgr.h
PacketQueue::destroyPacketQueue() - new function
src/lib/dhcp/packet_queue_mgr<4/6>.cc
PacketQueueMgr<4/6>::PacketQueueMgr<4/6>() - no longer creates a
default packet queue
src/lib/dhcpsrv/cfg_iface.cc
CfgIface::closeSockets() - removed call to stopDHCPReceiver
CfgIface::openSockets() - removed call to startDHCPReceiver
src/lib/dhcpsrv/parsers/dhcp_queue_control_parser.*
DHCPQueueControlParser
- removed unused family_ member
- parse() - added support for enable-queue
src/lib/dhcpsrv/tests/dhcp_queue_control_parser_unittest.cc
- new file
kea-dhcp4 will parse and use "queue-control" to configure ring
buffer size:
"Dhcp4":
{
"queue-control": {
# max number of packets the ring will hold
"capacity" : 100
},
:
This is an interrim commit for testing purposes.
Expect a fair amount of refactoring in subsequent commits.
New files:
src/lib/dhcp/queue_control.cc
src/lib/dhcp/queue_control.h
src/lib/dhcp/tests/queue_control_unittest.cc
src/lib/dhcpsrv/parsers/queue_control_parser.cc
src/lib/dhcpsrv/parsers/queue_control_parser.h
src/bin/dhcp4/ctrl_dhcp4_srv.cc
ControlledDhcpv4Srv::processConfig() -
added logic to set packet queue controller
src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/parser_context.*
Added queue-control parsing
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server() - recognize and parse "queue-control"
src/bin/dhcp4/tests/config_parser_unittest.cc
TEST_F(Dhcp4ParserTest, queueControl)
TEST_F(Dhcp4ParserTest, queueControlInvalid)
- new tests
src/lib/dhcp/iface_mgr.*
IfaceMgr::getPacketQueueControl4()
IfaceMgr::setPacketQueueControl4()
IfaceMgr::getPacketQueueControl6()
IfaceMgr::setPacketQueueControl6()
src/lib/dhcp/packet_queue.*
Use QueueControl class
src/lib/dhcpsrv/srv_config.*
Added QueueControl member, getter/setter
SrvConfig::toElement() - now emits queue-control if not null