2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00
Commit Graph

755 Commits

Author SHA1 Message Date
Franciszek Gorski
b56fa9d491 [755-Kea-DHCP-servers-observations-should-be-reset-to-some-initial-values-upon-restart-or-reconfiguration] add initialization of all statistisc during set up 2019-09-06 11:34:54 +02:00
Thomas Markwalder
1878553ab4 [#730,!2-p] Addressed review comments
Minor cleanup

ChangeLog
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/lib/dns/tests/name_unittest.cc
2019-08-16 16:52:25 -04:00
Thomas Markwalder
9260b6d915 [#730,!2] Corrected assertion failure on malformed hostname from kea-dhcp4
src/lib/exceptions/isc_assert.h
    New file that defines isc_assert_throw()

src/lib/exceptions/Makefile.am
    added isc_asssert.h

src/lib/exceptions/tests/exceptions_unittest.cc
    TEST(IscThrowAssert, checkMessage) - new test

src/lib/dns/labelsequence.cc
src/lib/dns/name.cc
    Replaced assert() calls with isc_throw_assert() calls

src/lib/dns/tests/name_unittest.cc
    TEST_F(NameTest, unexpectedParseError) - new unit test
    for hostname option content based on fuzz test failure

src/lib/dhcp_ddns/ncr_msg.cc
    Removed unnecessary include of dns/name.h

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processHostnameOption() - added try catch
    around OptionDataTypeUtil::getLabelCount() call

src/bin/dhcp4/dhcp4_messages.*
    added new log message DHCP4_CLIENT_HOSTNAME_MALFORMED

src/bin/dhcp4/tests/fqdn_unittest.cc
    TEST_F(NameDhcpv4SrvTest, serverUpdateMalformedHostname) -
    renamed test and augmented it to include the packet of death
    produced by fuzz testing.
2019-08-16 16:43:10 -04:00
Francis Dupont
bfa5b2c503 [606-drop-packets-in-drop-class] Addressed final comments 2019-07-16 14:05:40 +02:00
Francis Dupont
330065ad5f [606-drop-packets-in-drop-class] Addressed minor comments (checkpoint before rebasing) 2019-07-16 05:11:19 -04:00
Francis Dupont
217be4532b [606-drop-packets-in-drop-class] Added DROP class (including doc and unit tests) 2019-07-16 05:11:19 -04:00
Francis Dupont
20cd73860b [694-add-valid-lifetime-to-dhcp4_lease_alloc-and-dhcp6_lease_alloc-logging] Added lease valid lifetime to DHCP*_LEASE_ALLOC logs 2019-06-26 06:09:37 -04:00
Thomas Markwalder
8f1fb501d6 [#597,!323] Use round() when calculating T1/T2 to ensure consistent results
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::setTeeTimes() - added use of round()

src/bin/dhcp6/dhcp6_srv.cc
    Dhcpv6Srv::setTeeTimes() - added use of round()

src/bin/dhcp6/tests/dhcp6_test_utils.cc
    Dhcpv6SrvTest::checkIA_NA() - replaced used of
    EXPECTED_EQ with logic to add a failure so callers
    can ASSERT_NO_FATAL_FAILURE and pinpoint the invocation.

src/bin/dhcp6/tests/hooks_unittest.cc
    Wrapped calls to checkIA_NA() with ASSERT_NO_FATAL_FAILURE
    Updated expected T1 values to adjust for use of round().
2019-05-15 13:19:51 -04:00
Marcin Siodelski
96c63ac17a [#103,!277] DHCPv4 server is using CBControlDHCPv4. 2019-03-26 03:08:56 -04:00
Francis Dupont
f3563396d2 [519-dhcp-server-response-an-empty-rai-field] Added the bad RAI case 2019-03-12 04:59:39 -04:00
Francis Dupont
91872e63c3 [464-vivso-fix] Reindented 2019-02-19 12:15:37 +01:00
Tomek Mrugalski
d62be742f3 [#464,!238] Prototype fix for Genexis clients 2019-02-19 12:15:37 +01:00
Francis Dupont
c25bbf2616 [82-improve-kea-test-capabilities] Added remote port to dhcp4/dhcp6/perfdhcp 2019-01-18 17:50:10 +01:00
Francis Dupont
0487f6fc96 [82-improve-kea-test-capabilities] Made "server" port 2019-01-18 17:36:27 +01: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
Marcin Siodelski
44faa27e6d [#86,!152] Case insensitive hostname option comparison. 2018-12-04 10:10:30 +01:00
Francis Dupont
2f272cd336 [66-authoritative-flag-in-kea] Cleanup code, added legacy unit test 2018-11-07 23:20:22 +07:00
Sebastian Schrader
6abedf9501 [5184] Send NAK to unknown clients if authoritative 2018-11-07 23:17:45 +07:00
Tomek Mrugalski
87479e979c [#137,!42] Kea version moved to separate header. 2018-09-21 18:00:38 +02:00
Francis Dupont
12411724a0 [19-move-address-utilities] Moved address utilities 2018-08-31 03:04:08 -04:00
Thomas Markwalder
1825ead45e [5680] kea-dhcp4 now uses hostname sanititzer when configured for it
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processHostnameOption() - sanitizes client hostname
    if configured to do so

src/bin/dhcp4/tests/fqdn_unittest.cc
    TEST_F(NameDhcpv4SrvTest, sanitizeHostname) - new test to
    verify hostname sanitizing works as expected

src/lib/dhcpsrv/d2_client_cfg.h
    D2ClientConfig::getHostnameSanitizer() added missing getter

src/lib/dhcpsrv/tests/d2_client_unittest.cc
    TEST(D2ClientConfigTest, constructorsAndAccessors) - updated to
    verify hostname sanitizing stuff

src/lib/util/strutil.cc
    fixed regex compilation issue
2018-07-27 13:54:10 +02:00
Marcin Siodelski
c7d7be0801 [5664] Test that callout handle is reset after the callouts. 2018-06-29 17:51:41 +02:00
Francis Dupont
6a856ed972 [master] Finished merge of trac5549a (known/unknown) 2018-06-13 15:10:17 +02:00
Francis Dupont
d9c77f8ad4 [5549a] Addressed comments 2018-06-13 14:56:39 +02:00
Francis Dupont
4dfd330a24 [master] Finishing merge of trac5449 (Fixes from analyzers) 2018-06-07 16:51:51 +02:00
Francis Dupont
116962ddc5 [5549a] Code, examples and doc updated 2018-06-07 13:59:55 +02:00
Francis Dupont
ba30f1b4bc [5449] Extra fixes 2018-05-31 18:22:05 +02:00
Thomas Markwalder
7abe25fbed [5596] fixed typos in commentary 2018-05-29 07:42:57 -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
Francis Dupont
f079ed3f90 [5549a] Ported unit tests 2018-05-19 14:39:50 +02:00
Francis Dupont
fcbe15be47 [5549a] Rebased/Updated code - toto unit tests to port 2018-05-18 23:59:32 +02:00
Francis Dupont
ea5e005635 [master] Merged trac5617 (RADIUS reselect subnet) 2018-05-16 16:53:29 +02:00
Thomas Markwalder
5111f569bd [master] Kea servers discard packets before reconfig and exit
Merge branch 'trac5564'
2018-05-16 10:12:57 -04:00
Tomek Mrugalski
92e83eb2c8 [5564] Changes after review:
- dumpPackets renamed to discardPackets
 - added missing comments
2018-05-16 14:42:55 +02:00
Francis Dupont
a1de512678 [5515] Fixed the bug 2018-05-16 13:50:05 +02:00
Thomas Markwalder
5b9b5e26f0 [5564] Servers dump cached and parked packets on reconfig and shutdown
src/bin/dhcp4/dhcp4_srv.*
    - dumpPackets() - new function that frees all cached and parked packets
    - Dhcpv4Srv::~Dhcpv4Srv() - added call to dumpPackets() for cleanliness

src/bin/dhcp4/json_config_parser.cc
    configureDhcp4Server() - added a call Dhcpv4Srv::dumpPackets()

src/bin/dhcp6/dhcp6_srv.*
    - dumpPackets() - new function that frees all cached and parked packets
    - Dhcpv6Srv::~Dhcpv6Srv() - added call to dumpPackets() for cleanliness

src/bin/dhcp6/json_config_parser.cc
    configureDhcp6Server() - added a call Dhcpv6Srv::dumpPackets()

src/lib/hooks/hooks_manager.h
    - clearParkingLots() - new convenience function for clearing
     all parking lots
    - clearParkingLotsInternal() - private impl of the above
2018-05-15 16:00:22 -04:00
Francis Dupont
f8a235791a [5617] Moved selector init to library 2018-05-11 16:35:04 +02:00
Tomek Mrugalski
78c7a4f55c [5605a] Minor changes after review:
- comments added
2018-05-07 17:25:17 +02:00
Francis Dupont
aeac538382 [5605a] Added a sanity_only flag to selectSubnet* 2018-05-02 22:00:34 +02:00
Francis Dupont
68b8dbf33e [master] Removed unused defs 2018-04-18 18:12:19 +02:00
Francis Dupont
0260a6284e [master] Merging trac5374 (new classification) - conflicts resolved, regen needed 2018-04-11 16:42:23 +02:00
Francis Dupont
2a6049947a [master] Finishing merge of trac5404 (port relay) 2018-04-09 14:32:48 +02:00
Francis Dupont
6418fa8a42 [5374] Checkpoint for regen before tests 2018-04-07 15:15:41 +02:00
Francis Dupont
b6d4dff8ae [5374] Checkpoint before regen 2018-04-06 00:12:52 +02:00
Francis Dupont
955441318a [5404] Addressed comments and updated I-D references 2018-04-04 16:44:56 +02:00
Marcin Siodelski
975d8d6aff [5470] Added network_state parameter to the dhcp4_srv_configured hook. 2018-03-22 12:26:58 +01:00
Thomas Markwalder
59ef33ee17 [master] kea-dhcp4/6 now attempt to process packets with bad vendor options
Merge branch 'trac5551'
2018-03-09 10:51:31 -05:00
Marcin Siodelski
af43f07b0e [master] Merge branch 'trac5457'
# Conflicts:
#	src/bin/dhcp4/tests/callout_library_1.cc
#	src/bin/dhcp4/tests/callout_library_2.cc
2018-03-06 19:19:19 +01:00
Marcin Siodelski
9d8bcd3980 [master] Merge branch 'trac5437' 2018-03-02 20:30:29 +01:00