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

224 Commits

Author SHA1 Message Date
Razvan Becheriu
5f17f66387 [#1405] fixed check for both reservation-mode and reservation-modes 2020-11-18 15:55:22 +02:00
Razvan Becheriu
02ac459451 [#1405] added parser class 2020-11-18 15:55:22 +02:00
Thomas Markwalder
00305bc7d4 [#1386] kea-dhcp4/6 now parse ddns-use-conflict-resolution
Both servers parse and store ddns-use-conflict-resolution but
do nothing with it.

doc/examples/kea4/all-keys.json
doc/examples/kea4/with-ddns.json
doc/examples/kea6/all-keys.json
doc/examples/kea6/with-ddns.json
    Added entries for ddns-use-conflict-resolution

src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/tests/get_config_unittest.cc
    Added support for ddns-use-conflict-resolution

src/bin/dhcp4/tests/get_config_unittest.cc.skel
    Changed important calls to ASSERT_NO_THROW_LOG to ease debugging

src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/tests/get_config_unittest.cc
    Added support for ddns-use-conflict-resolution

src/bin/dhcp6/tests/get_config_unittest.cc.skel
    Changed important calls to ASSERT_NO_THROW_LOG to ease debugging

src/lib/dhcpsrv/parsers/base_network_parser.cc
    Fixed copy/paste error
2020-10-21 14:19:52 -04:00
Thomas Markwalder
3a4455a4a7 [#1385] kea-dhcp4 supporst ddns-update-on-renew
(Parsers need to be regenerated)

src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
    added ddns-update-on-renew parameter

src/bin/dhcp4/dhcp4_srv.*
    Dhcpv4Srv::createNameChangeRequests() - added DdnsParams
    argument and modified to use ddns-update-on-renew in logic

src/bin/dhcp4/tests/fqdn_unittest.cc
    TEST_F(NameDhcpv4SrvTest, createNameChangeRequestsUpdateOnRenew)
    - new test

src/bin/dhcp4/tests/get_config_unittest.cc
    Updated

src/lib/dhcpsrv/network.*
src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
src/lib/dhcpsrv/srv_config.*
    Added ddns-update-on-renew

src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
src/lib/dhcpsrv/tests/shared_network_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
src/lib/dhcpsrv/tests/subnet_unittest.cc
    updated tests
2020-10-09 16:51:28 +02:00
Marcin Siodelski
ab278ed455 [#1428] Basic support for ip-reservations-unique
The DHCPv4 and DHCPv6 servers accept ip-reservations-unique configuration
for IP addresses specified in the configuration file.
2020-10-08 15:44:39 +02:00
Marcin Siodelski
7ccddf643d [#1428] Added ip-reservations-unique parameter
Also regenerated parsers.
2020-10-08 15:44:39 +02:00
Francis Dupont
2fbc4fc0e3 [#1418] Checkpoint: more renames 2020-10-02 17:10:31 +02:00
Francis Dupont
2505d5e3fd [#1418] Checkpoint: updated library, a syntax regen is required 2020-10-02 16:48:59 +02:00
Francis Dupont
6fdd4d7ef9 [#1330] Moved closeSockets 2020-07-27 08:42:02 +00:00
Francis Dupont
02f2139158 [#1330] Revamped interface config parser 2020-07-27 08:42:02 +00:00
Francis Dupont
4c2dbcd065 [#1282] Checkpoint: todo HA new test 2020-06-27 17:59:10 +02:00
Francis Dupont
7e15a39920 [#1245] Addressed comments, todo unittests 2020-06-17 11:27:52 +02:00
Francis Dupont
b82d5ab0b8 [#1245] Forced shared-networks to be handled before (global) subnets 2020-06-17 11:27:52 +02:00
Francis Dupont
8f7329489f [#1245] Checkpoint: flatten v4 2020-06-17 11:27:52 +02:00
Razvan Becheriu
90a422cc92 [#1188] enable multi-threading mode on config parse and added unittests 2020-04-30 13:53:48 +03:00
Razvan Becheriu
f6fd99863b [#893] reverted changes 2020-04-16 14:42:34 +03:00
Razvan Becheriu
349a6aead2 [#893] addressed review comments 2020-04-15 15:25:07 +03:00
Razvan Becheriu
37a16eb94e [#893] added multi threading config parser 2020-04-14 22:28:19 +03:00
Razvan Becheriu
ea9a9fa460 [#893] addressed review comments 2020-04-14 22:27:43 +03:00
Razvan Becheriu
0ab220a3e3 [#893] added multi-threading parameters 2020-04-14 22:20:29 +03:00
Francis Dupont
a4dc3db6b3 [#1005] Checkpoint: updated stats lib 2020-04-14 20:31:35 +02:00
Thomas Markwalder
6b2e8eb4a7 [#1010] Added support for store-extended-info to kea-dhcp4
modified:
    src/bin/dhcp4/dhcp4_lexer.cc
	src/bin/dhcp4/dhcp4_lexer.ll
	src/bin/dhcp4/dhcp4_parser.cc
	src/bin/dhcp4/dhcp4_parser.h
	src/bin/dhcp4/dhcp4_parser.yy
	src/bin/dhcp4/json_config_parser.cc
	src/bin/dhcp4/location.hh
	src/bin/dhcp4/position.hh
	src/bin/dhcp4/stack.hh
	src/bin/dhcp4/tests/get_config_unittest.cc
2020-04-02 21:08:09 +02:00
Michal Nowikowski
6eb858af23 [#1159] added release entry in ChangeLog and updated copyright dates 2020-03-23 09:09:42 +01:00
Razvan Becheriu
cd334bd557 [#893] enable command line parameters 2020-03-18 16:14:29 +02:00
Thomas Markwalder
256feda606 [#35,!517] Rework kea-dhcp4 parsing and server
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
2019-10-10 08:32:44 -04:00
Francis Dupont
637e9f03cc [616-error-msgs-contain-references-to-config-file-while-config-backend-is-used] Addressed comment 2019-06-27 19:32:49 +02:00
Francis Dupont
94fd660ecb [616-error-msgs-contain-references-to-config-file-while-config-backend-is-used] Split commit block to add CB indication in log/error messages 2019-06-27 19:32:49 +02:00
Francis Dupont
102bf07484 [295-min-max-lease-time-configuration-options] Added DHCPv4 server tests 2019-06-22 10:05:23 -04:00
Francis Dupont
772569640a [540-recommend-moving-hostname-char-set-and-hostname-char-replacement-out-of-dhcp-ddns] Checkpoint between DHCPv6 regen 2019-06-13 15:21:07 +02:00
Francis Dupont
7bc4cc182a [208-move-logging-from-global-objects-to-global-params] Almost done. Checkpoint of the day 2019-05-22 18:10:24 -04:00
Tomek Mrugalski
e2d257106d [#494, !273] Removed old code after rebase. 2019-04-19 07:26:14 -04:00
Francis Dupont
93f0644ad5 [494-dhcp4configparser-sharednetworkssanitychecks-is-buggy] Fixed sharedNetworksSanityChecks 2019-04-19 07:26:14 -04:00
Francis Dupont
5c139602d7 [500-strengthen-option-def-parser] Updating bound 0 2019-04-10 17:07:46 -04:00
Francis Dupont
85b4bef45c [500-strengthen-option-def-parser] Added OptionDefParser code value sanity checks 2019-04-10 17:07:46 -04:00
Marcin Siodelski
63b6195876 [#490,!284] Extended commentary per review comments. 2019-03-27 20:45:14 +01:00
Marcin Siodelski
92e514ebd7 [#490,!284] Addressed review comments. 2019-03-27 20:45:14 +01:00
Marcin Siodelski
aa61dcb0f8 [#490,!284] Regenerated parser tests. 2019-03-27 20:45:14 +01:00
Marcin Siodelski
8a21f443a6 [#490,!284] Enable dynamic inheritance for networks in config file. 2019-03-27 20:44:25 +01:00
Marcin Siodelski
227bdc64b6 [#103,!277] Use enum instead of boolean in databaseConfigFetch.
As a result of review.
2019-03-26 03:08:57 -04:00
Marcin Siodelski
d8e6e1a017 [#103,!277] Reset CBControl upon DHCPv4 serverreconfiguration. 2019-03-26 03:08:56 -04:00
Marcin Siodelski
96c63ac17a [#103,!277] DHCPv4 server is using CBControlDHCPv4. 2019-03-26 03:08:56 -04:00
Marcin Siodelski
c3ec4cb50a [#487,!242] Use Optionals in the Subnet and Shared networks. 2019-02-28 08:38:18 -05:00
Thomas Markwalder
16d2eaa574 [#402,!224] kea-dhcp4 now merges global values from config backend
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
2019-02-20 11:22:49 -05:00
Marcin Siodelski
edd745c507 [#429,!217] Dropped "Signed" in StampedValue::getSignedInteger 2019-01-31 21:30:46 +01:00
Marcin Siodelski
3179f30318 [#429,!217] Removed StampedValue::toElement. 2019-01-31 21:00:16 +01:00
Thomas Markwalder
7b634d9f36 [#101,!202] Added log messages and more unit tests
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
2019-01-25 08:34:11 -05:00
Thomas Markwalder
dc74694de3 [#101,!202] Interrim commit - v4 fetch and merge functional
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
2019-01-24 10:16:19 -05:00
Francis Dupont
4fc9105e2f [365-automatically-calculate-the-values-for-options-58-and-59] Removed extra traling spaces 2019-01-10 15:31:21 +01:00
Thomas Markwalder
9a7cd6e027 [#365,!194] kea-dhcp4 can be configured to calculate T1 and T2
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
2019-01-09 11:14:01 -05:00
Thomas Markwalder
bbb822b115 [#260,!20] Packet queueing is now optional
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
2018-11-20 13:14:28 -05:00