2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

84 Commits

Author SHA1 Message Date
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
Francis Dupont
c9d87afad8 [575-cb-cmds-unknown-fields-in-arguments-should-raise-an-error] Fixed rebase errors 2019-07-07 11:07:09 +02:00
Francis Dupont
43526b2d6c [575-cb-cmds-unknown-fields-in-arguments-should-raise-an-error] Moved parameters and defaults to simple_parser[46] files 2019-07-07 11:07:09 +02:00
Thomas Markwalder
68b2cb0385 [#686,!403] Addressed review comments
Fixed cosmetics. Spacing etc...
2019-07-01 08:12:24 -04:00
Thomas Markwalder
e292f3a234 [#686,!403] LFC now sees sanity checking as disabled
Add CfgConsistency defaults to application level parsing

src/lib/dhcpsrv/cfg_consistency.h
    Changed constructor default mode to LEASE_CHECK_NONE

src/lib/dhcpsrv/lease_file_loader.h
    LeaseFileLoader::load() - modified to create and use a
    sanity_checker only if checking is enabled.  This avoids
    senselessly making the same decisions for every lease loaded.

src/lib/dhcpsrv/parsers/simple_parser4.*
src/lib/dhcpsrv/parsers/simple_parser6.*
    Added sanity checks defaults so they can be properly set at
    the application level.

src/lib/dhcpsrv/sanity_checker.h
    SanityChecker::leaseCheckingEnabled() - new static function
    to test if sanity checking for leases is enabled

src/lib/dhcpsrv/tests/sanity_checks_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
    updated tests for new constructor default value
2019-07-01 08:12:24 -04:00
Francis Dupont
9ef628e779 [295-min-max-lease-time-configuration-options] Removed default- keywords 2019-06-22 10:05:23 -04:00
Francis Dupont
da42fc316e [295-min-max-lease-time-configuration-options] checkpoint 2019-06-22 10:05:23 -04:00
Francis Dupont
52b0c820d3 [540-recommend-moving-hostname-char-set-and-hostname-char-replacement-out-of-dhcp-ddns] Checkpoint before regen 2019-06-13 15:21:07 +02:00
Francis Dupont
f6e59ec9a9 [208-move-logging-from-global-objects-to-global-params] Update keywords and removes consistency from cassandra example 2019-05-22 18:10:24 -04:00
Francis Dupont
723efb56e8 [499-global-keywords-entries] Added global parameter lists 2019-03-07 10:50:34 -05: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
2d0e62f115 [#277, !164] Congestion Handling is now disabled by default
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Changed enable-queue default to false

src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
    Rebuilt generated tests

doc/guide/congestion-handling.xml
    Updated verbage on default setting
2018-12-10 10:04:19 -05:00
Thomas Markwalder
fc25218610 [#276,!132] Changed dhcp-queue-control.enable-queue to default to true 2018-11-21 15:18:56 -05:00
Thomas Markwalder
c276bb456b [#260,!120] Added dhcp-queue-control parser defaults
Added dhcp-queue-control defaults to SimpleParser<4/6>
    Revamped server config unit tests
2018-11-20 13:23:49 -05:00
Francis Dupont
fae9245a36 [268-reservation-mode-is-not-global] Updated code for global reservation mode 2018-11-20 19:00:41 +01:00
Sebastian Schrader
09987b3f2d [5184] Parse authoritative flag 2018-11-07 23:17:45 +07:00
Thomas Markwalder
7fd4a5c044 [#32,!23] - Added server-tag global to SrvConfig and kea-dhcp4/6
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
    added server-tag

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

src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/json_config_parser.cc
    added server-tag

src/bin/dhcp6/tests/config_parser_unittest.cc
    TEST_F(Dhcp6ParserTest, serverTag)

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
    Added server-tag to global defaults

src/lib/dhcpsrv/srv_config.cc
    Added server_tag_ memger to SrvConfig

src/lib/dhcpsrv/tests/srv_config_unittest.cc
    TEST_F(SrvConfigTest, serverTag)
    TEST_F(SrvConfigTest, unparseConfigControlInfo6) - new tests
2018-10-05 09:19:44 -04:00
Thomas Markwalder
38426e16ec [master] DHCPv4 renew/rebind-timers are now optional
Merge branch 'trac5596'
2018-05-30 10:38:26 -04:00
Thomas Markwalder
dec8d15f4a [5596] renew-timer and rebind-timer now optional for DHCPv4
v4 Parsing now allows renew/rebind timers to be unspecified,
and kea-dhcp4 logic now matchs ISC DHCP:

1. Send T2 only if it is specified and is less than lease lifetime
2. Send T1 only if it is specified and is less than either T2
if specified, or lease lifetime in the absence of T2

doc/guide/dhcp4-srv.xml
    Updated discussion of rebind/renew-timers

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::assignLease() - modified to sanity check
    T1 and T2

src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp4/tests/simple_parser4_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
    updated numerous tests

src/lib/dhcpsrv/network.cc
    Network::toElement() - only outputs T1, T2, and
    valid lifetime if they are specified

src/lib/dhcpsrv/network.h
    Network() - inits t1_, t2_, and valid_ to unspecified
    Triplet value

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
    Subnet4ConfigParser::initSubnet() - allow renew-timer and
    rebind-timer to be optional

src/lib/dhcpsrv/parsers/simple_parser4.cc
    SimpleDefaults SimpleParser4::GLOBAL4_DEFAULTS - removed
    entries for renew-timer and rebind-timer
2018-05-25 11:12:30 -04:00
Thomas Markwalder
5b92887e9c [5521] Used a different script that skips generated files
Added config.h to non-generated cc files only
2018-05-18 14:19:29 -04:00
Thomas Markwalder
2f2a7d78b8 Revert "[5521] Missing config.h includes added"
This reverts commit 26a40b480c6b427973402613fda290ad249efddd.
2018-05-18 13:54:33 -04:00
Tomek Mrugalski
26a40b480c [5521] Missing config.h includes added 2018-05-16 20:17:07 +02:00
Francis Dupont
f8aaf42fc5 [5277] Extended server-hostname and boot-file-name (native for subnet4, else inherited) 2017-10-01 23:20:38 +02:00
Tomek Mrugalski
9f71dcc4b8 [5360] Lexer fixed, unit-tests added. 2017-09-15 23:33:08 +02:00
Tomek Mrugalski
67c386b582 [5360] client-class and match-client-id params on shared-network level 2017-09-15 20:00:40 +02:00
Tomek Mrugalski
3e1e56f151 [5357] Addressed comments after review:
- many more parameters are now inherited from shared-network to subnet4
 - parameters now passed as const reference
 - it is no longer possible to specify echo-client-id on shared-network
   level (because it's a global parameter)
 - example config commented properly
2017-09-13 22:23:20 +02:00
Tomek Mrugalski
a5abebaa0f [5357] Parser for shared-networks in DHCPv6 implemented. 2017-09-13 10:38:27 +02:00
Tomek Mrugalski
b9c54a65ae [5357] Shared-networks parser for v4 extended. 2017-09-13 00:30:32 +02:00
Marcin Siodelski
5e0bc0d720 [5315] Moved DHCPv4 and DHCPv6 simple parsers to libdhcpsrv. 2017-08-15 14:00:29 +02:00