2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 04:57:52 +00:00

78 Commits

Author SHA1 Message Date
Thomas Markwalder
1ea70ecc43 [#2719] Adds offer_lft to globali and network scopes
offer-lft added to global, shared-network4, and subnet4
Can be set/fetched/parsed but does nothing yet.

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/cfg_globals.*
    Add offer-lft to global, shared-network4, and subnet4 values

src/lib/dhcpsrv/network.*
    Add offer_lft_ to Network4

src/lib/dhcpsrv/parsers/base_network_parser.*
    BaseNetworkParser::parseOfferLft() - new function

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
    Subnet4ConfigParser::initSubnet()

src/lib/dhcpsrv/parsers/shared_network_parser.cc
    SharedNetwork4Parser::parse() - add call to parseOfferLft()

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
    TEST_F(AllocEngine4Test, discoverOfferLft) - new test, currently
    fails because impl is missing.

src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
    Updated tests to account for offer-lft

src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
    Added offer-lft

src/bin/dhcp4/tests/get_config_unittest.cc
    Regenerated tests.
2023-03-23 07:17:48 -04:00
Francis Dupont
7efe36286c [#719] Reapplied patch 2023-03-15 13:49:21 +01:00
Andrei Pavel
0ba954d4c7
[#2402] enable MT by default 2023-02-14 14:23:05 +02:00
Wlodek Wencel
e0f96268f8 [#2732] release changes 2023-01-23 19:18:49 +01:00
Marcin Siodelski
d92cc17a20 [#969] DHCPv6 allocators configurable 2023-01-07 11:45:06 +01:00
Marcin Siodelski
9571b8f80b [#969] Configure allocator for DHCPv4 2023-01-07 11:45:06 +01:00
Francis Dupont
af504ccd27 [#2249] Checkpoint before regen 2022-03-14 20:20:37 +02:00
Andrei Pavel
12a62ae17d
[#2320] release changes 2022-02-21 10:36:48 +02:00
Razvan Becheriu
cd5f61195a [#2036] make host reservations lookup before lease lookup configurable 2022-02-04 16:35:23 +02:00
Thomas Markwalder
f914dd9c96 [#1307] Added parked-packet-limit parameter to kea-dhcp4
Can be parsed, but does nothing

doc/examples/kea4/all-keys.json
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
    added parked-packet-limit

src/bin/dhcp4/tests/config_parser_unittest.cc
    TEST_F(Dhcp4ParserTest, parkedPacketLimit)  - new test

src/bin/dhcp4/tests/get_config_unittest.cc
    updated
2021-09-17 11:10:34 -04:00
Andrei Pavel
0b4b7fd648
[#1860] unit tests for lenient option parsing 2021-05-19 15:59:03 +03:00
Andrei Pavel
c53e135833
[#1656] 1.9.4 release: update copyrights 2021-01-25 13:52:09 +02:00
Razvan Becheriu
d66b4b70a0 [1598] convert reservation-mode from CB to new flags 2021-01-19 13:37:45 +02:00
Razvan Becheriu
d33589a76f [#1598] disable set reservation-mode in db api 2021-01-19 13:37:45 +02:00
Razvan Becheriu
8d05ba02b2 [#1405] merged first pass 2020-11-18 15:55:23 +02:00
Razvan Becheriu
21f9a8f82c [#1405] in-subnet is equivalent to all 2020-11-18 15:55:23 +02:00
Razvan Becheriu
4bb89f01a7 [#1405] implemented separate boolean flags for reservation modes 2020-11-18 15:55:22 +02:00
Razvan Becheriu
27e2a4350e [#1405] fixed create and drop schema tables 2020-11-18 15:55:22 +02:00
Razvan Becheriu
ce8c48be28 [#1405] fixed unittests 2020-11-18 15:55:22 +02:00
Razvan Becheriu
b4540aafa5 [#1405] fixed unittests 2020-11-18 15:55:22 +02:00
Razvan Becheriu
5d1fac920a [#1405] fixed unittests 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
f8174588d5 [1386] Added support for ddns-use-conflict-resolution to dhcpsrv
src/lib/dhcpsrv/network.*
    Added Network::ddns_use_conflict_resolution_

src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Added "ddns-use-conflict-resolution"

src/lib/dhcpsrv/srv_config.*
    Added DdnsParams::use_conflict_resolution_

src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
    Updated tests
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
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
6032d69603 [#285] Moved to 64 2020-08-13 12:25:38 +02:00
Francis Dupont
be9c2d6b17 [#1007] Addressed comments 2020-08-05 13:58:29 +02: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
576fb6cbb0 [#893] fixed unittests 2020-04-14 22:32:06 +03:00
Razvan Becheriu
ce4a5977fb [#893] minor fixes 2020-04-14 22:28:19 +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
4d3cb9ab14 [#1010] Modified AllocateEngine and parsers to store extended v6 lease info
src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::reuseExpiredLease()
    AllocEngine::createLease6()
    AllocEngine::extendLease6() - added call to AllocEngine::updateLase6ExtendedInfo()

    AllocEngine::updateLease4ExtendedInfo() - create Elements directly

    AllocEngine::updateLease6ExtendedInfo() - new method

src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
    TEST_F(AllocEngine6ExtendedInfoTest, updateExtendedInfo6)
    TEST_F(AllocEngine6ExtendedInfoTest, storeExtendedInfoEnabled6)
    TEST_F(AllocEngine6ExtendedInfoTest, storeExtendedInfoDisabled6)
    TEST_F(AllocEngine6ExtendedInfoTest, reuseExpiredLease6)
    - new tests

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/shared_network_parser.cc
src/lib/dhcpsrv/parsers/base_network_parser.*
    Renamed BaseNetworkParser::parseCommonTimer() to parseCommon() and
    added handling of store-extended-info.

src/lib/dhcpsrv/parsers/simple_parser6.cc
    Added store-extended-info

src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
    updated tests
2020-04-02 21:08:09 +02:00
Thomas Markwalder
fb3e48e595 [#1010] Added v4 support of store-extended-info to lib dhcpsrv
src/lib/dhcpsrv/alloc_engine.cc
    AllocEngine::updateLease4ExtendedInfo()
    - added check of store-extended-info

src/lib/dhcpsrv/network.*
src/lib/dhcpsrv/parsers/simple_parser4.cc
    added parameter for store-extended-info

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc

    Updated tests to include store-extended-info
2020-04-02 21:06:01 +02:00
Thomas Markwalder
adf6634a7f [#1048] Enable host sanitizing by default
src/lib/util/strutil.cc
    StringSanitizerImpl::scrub() - modified non-USE_REGEX code to
    handle embedded nuls.

src/lib/util/tests/strutil_unittest.cc
    Updated tests

src/bin/dhcp4/tests/fqdn_unittest.cc
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/fqdn_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
    updated testing

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Added global default values

doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/dhcp4-srv.rst
    Updated sanitizing text
2020-02-21 10:07:34 +01:00
Michal Nowikowski
ba41c187b5 [#1098] updated more copyright dates 2020-01-27 19:52:58 +01:00
Francis Dupont
62d408dc0b [724-subnet-and-shared-network-default-and-inheritance-are-not-consistent] Removed other variables which can be handled by getProperty only 2020-01-27 15:13:55 +01:00
Francis Dupont
c7454f18f6 [724-subnet-and-shared-network-default-and-inheritance-are-not-consistent] Checkpoint: removed version specific variables 2020-01-27 15:13:55 +01:00
Thomas Markwalder
49ce6286f5 [#35,!517] Addressed final review comments
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Fixed indentations in defaults list
2019-10-10 08:36:39 -04:00
Thomas Markwalder
1f60cb9dd7 [#35,!517] Removed ddns params from INHERIT_TO_SUBNETX lists
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
    regenerated tests

src/lib/dhcpsrv/parsers/simple_parser4.cc
    Removed DDNS params from INHERIT_TO_SUBNET4 list

src/lib/dhcpsrv/parsers/simple_parser6.cc
    Removed DDNS params from INHERIT_TO_SUBNET6 list
2019-10-10 08:34:39 -04:00
Thomas Markwalder
77cfe4bc79 [#35,!517] Added getDdnsParams() to AllocEngine::ClientContext4/6
src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::ClientContext6::getDdnsParams()
    AllocEngine::ClientContext4::getDdnsParams() - new
    methods which return a DdnsParams instance scoped by
    currently selected subnet

    Replaced direct references to context::ddns_params_ with
    new getter methods.

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Removed global defaults for hostname-char-set/replacement
2019-10-10 08:32:44 -04:00
Thomas Markwalder
6d6a3eed52 [#35,!517] Changed moveDdnsParams to modify element map instead of SrvConfig
Moving the parameters needs to be done before defaults are applied to the
config, so moveDdnsParams was changed to modify a mutable top level
element map instead of SrvConfig contents.

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Change ddns-send-updates default to true.

src/lib/dhcpsrv/srv_config.*
    SrvConfig::getConfiguredGlobal() - new method to fetch a
    global by name

    SrvConfig::moveDdnsParams() - changed to accept/modify
    a top-level Element map

src/lib/dhcpsrv/tests/srv_config_unittest.cc
    updated unit tests accordingly
2019-10-10 08:32:44 -04:00
Thomas Markwalder
590767d4d6 [#35,!517] Added hostname-char-set to hostname-char-replacement network/subnet scopes
src/lib/dhcpsrv/d2_client_cfg.*
    Added hostname-char-set and hostname-char-replacement to DdnsParms
    DdnsParams::getHostnameSanitizer()  - new function to return a sanitizer

src/lib/dhcpsrv/d2_client_mgr.h
    D2ClientMgr::adjustDomainName() - now gets sanitizer from ddns_params

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
    Added hostname-char-set and hostname-char-replacement to networks and subnets
2019-10-10 08:32:44 -04:00
Thomas Markwalder
e782a9d5a7 [#35,!517] Added DDDNS parameters to networks,subnets, and their parsers
src/lib/dhcpsrv/network.*
    Network - added DDNS parameters: Optional members, getters, setters
    Network::toElement() - added DDNS parameters

src/lib/dhcpsrv/parsers/base_network_parser.*
    BaseNetworkParser::parseDdnsParams() - new method to parse DDNS parameters

    BaseNetworkParser::parseLifetime() - fixed unitialized variables warning

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
    Subnet4ConfigParser::initSubnet()
    Subnet6ConfigParser::initSubnet()  - added call to parseDdnsParms().

src/lib/dhcpsrv/parsers/shared_network_parser.cc
    SharedNetwork4Parser::parse()
    SharedNetwork6Parser::parse() - added call to parseDdnsParms().

src/lib/dhcpsrv/parsers/simple_parser4.cc
    SimpleParser4::GLOBAL4_PARAMETERS
    SimpleParser4::GLOBAL4_DEFAULTS
    SimpleParser4::SUBNET4_PARAMETERS
    SimpleParser4::INHERIT_TO_SUBNET4
    SimpleParser4::SHARED_NETWORK4_PARAMETERS - added DDNS parameters

src/lib/dhcpsrv/parsers/simple_parser6.cc
    SimpleParser6::GLOBAL6_PARAMETERS
    SimpleParser6::GLOBAL6_DEFAULTS
    SimpleParser6::SUBNET6_PARAMETERS
    SimpleParser6::INHERIT_TO_SUBNET6
    SimpleParser6::SHARED_NETWORK6_PARAMETERS - added DDNS parameters

src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
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/subnet_unittest.cc
    Updated tests.
2019-10-10 08:32:44 -04:00
Thomas Markwalder
4f57cfa254 [#35,!517] Removed DDNS params from D2ClientCfg and tests
src/lib/dhcpsrv/d2_client_cfg.*
    D2ClientConfig - removed DDNS params

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
    D2ClientConfigParser::parse() - removed DDNS params

src/lib/dhcpsrv/parsers/simple_parser4.cc
    SimpleParser4::GLOBAL4_PARAMETERS
    SimpleDefaults SimpleParser4::GLOBAL4_DEFAULTS
    - added DDSN params

src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
    Updated calls to D2ClientCfg ctor

src/lib/dhcpsrv/tests/d2_client_unittest.cc
    Removed DDNS and hostname params from tests

src/lib/dhcpsrv/tests/d2_udp_unittest.cc
    Updated calls to D2ClientCfg ctor

src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
    Removed DDNS and hostname params from tests
2019-10-10 08:32:44 -04:00