2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00
Commit Graph

755 Commits

Author SHA1 Message Date
Francis Dupont
be8c8f76eb [#1147] Checkpoint before alloc cleanup 2020-05-26 11:51:57 +02:00
Francis Dupont
5e6cd1043e [#1147] Checkpoint: client queue of one 2020-05-26 11:51:57 +02:00
Francis Dupont
25208e91c4 [#1147] Split processPacket 2020-05-26 11:51:57 +02:00
Francis Dupont
cebeb2eaa0 [#1147] Checkpoint: finished same client 2020-05-26 11:51:57 +02:00
Razvan Becheriu
984dde269e [#1227] addressed review 2020-05-15 21:21:41 +03:00
Francis Dupont
c8b21c81a6 [#1173] Addressed comments 2020-05-07 19:49:15 +03:00
Francis Dupont
99ad85b77b [#1173] Implemented the incompatibility case 2020-05-07 19:49:15 +03:00
Francis Dupont
42b085e1fe [#1132] Fixed/improved the code and added new unit tests 2020-04-23 15:37:29 +02:00
Wlodek Wencel
b428583eed [#1132] addressed review comments 2020-04-23 15:36:12 +02:00
Wlodek Wencel
23c29a3fb5 [#1132] testing mode send to source enabled for kea4 2020-04-23 15:36:12 +02:00
Razvan Becheriu
349a6aead2 [#893] addressed review comments 2020-04-15 15:25:07 +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
Marcin Siodelski
2229ae696f [#1139] Extended commentary
The commentary explaning why we do another client classification evaluation
pass has been extended per review comments.
2020-03-19 12:14:51 +00:00
Marcin Siodelski
2ac4e47cb5 [#1139] Fixed typos in .cc/h files
Fixed typos in the comments within the dhcp4_srv and dhcp6_srv per review
comments.
2020-03-19 12:14:51 +00:00
Marcin Siodelski
c642381221 [#1139] Preserve non-host dependent classes
If there are any classes in the host reservations, instead of clearing all
of the classes, remove the ones that are definede in the config. Then,
evaluate them again taking into account reserved ones.
2020-03-19 12:14:51 +00:00
Marcin Siodelski
2b705d9172 [#1139] Host based classes used in allocation
The DHCPv4 server now takes into account client classes specified in
gobal reservations to select a subnet and/or pool for allocation within
a shared network.
2020-03-19 12:14:51 +00:00
Razvan Becheriu
1fb1735927 [#1016] moved critical section to lib util 2020-03-06 15:12:42 +02:00
Thomas Markwalder
17580ffc98 [#1115] shutdown command exit-value arg, exit w/failure on db loss
Added exit-value argument to shutdown command.
kea-dhcpX servers now exit with EXIT_FAILURE status on db loss

src/lib/process/daemon.*
    Daemon::exit_value_,  new member with getter/setter

src/lib/process/d_controller.*
    DControllerBase::launch() - now returns getExitValue()
    DControllerBase::shutdownHandler() - uses exit-value argument to set exit
    value

src/lib/process/tests/daemon_unittest.cc
    TEST_F(DaemonTest, exitValue)  - new test

src/bin/agent/main.cc
    Use launch() return value for exit value.

src/bin/agent/tests/ca_controller_unittests.cc
    TEST_F(CtrlAgentControllerTest, shutdownExitValue)  - new test

src/bin/d2/main.cc
    Use launch() return value for exit value.

src/bin/d2/tests/d2_command_unittest.cc
    TEST_F(CtrlChannelD2Test, shutdownExitValue)  - new test

src/bin/dhcp4/ctrl_dhcp4_srv.*
    ControlledDhcpv4Srv::
        commandShutdownHandler() - handle exit-value argument
        shutdown(int exit_value) - added exit_value parameter
        dbReconnect() - call shutdown(EXIT_FAILURE)
        dbLostCallback() - call shutdown(EXIT_FAILURE)

src/bin/dhcp4/dhcp4_srv.*
    Dhcp4Srv::run() - returns int Daemon::exit_value instead of bool

src/bin/dhcp4/main.cc
    Use run() return value for exit value.

src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
    TEST_F(CtrlChannelDhcpv4SrvTest, commands) - revamped test

src/bin/dhcp6/ctrl_dhcp6_srv.*
    ControlledDhcpv6Srv::
        commandShutdownHandler() - use exit-value argument to set exit value
        shutdown(int exit_value) - added exit_value parameter
        dbReconnect() - call shutdown(EXIT_FAILURE)
        dbLostCallback() - call shutdown(EXIT_FAILURE)

src/bin/dhcp6/dhcp6_srv.*
    Dhcp6Srv::run() - returns int Daemon::exit_value instead of bool

src/bin/dhcp6/main.cc
    Use run() return value for exit value.

src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
    TEST_F(CtrlDhcpv6SrvTest, commands) - revamped test
2020-03-04 06:59:52 -05:00
Razvan Becheriu
16dfb865b1 [#892] refactored 2020-02-21 17:41:31 +02:00
Razvan Becheriu
7d300cabc8 [#892] refactored 2020-02-21 17:41:31 +02:00
Razvan Becheriu
d53ab4351b [#892] refactored 2020-02-21 17:41:31 +02:00
Razvan Becheriu
e823054697 [#892] fixed compilation 2020-02-21 17:41:31 +02:00
Razvan Becheriu
1d32ebae97 [#892] handle parking 2020-02-21 17:41:31 +02:00
Razvan Becheriu
00d6396b3b [#892] create pkt thread pool and handle processing using multiple threads 2020-02-21 17:41:31 +02:00
Tomek Mrugalski
d80bfc7c98 [#1090] empty line removed 2020-02-10 15:08:42 +01:00
Tomek Mrugalski
0b836284b9 [#1090] pkt4_send drop status now actually drops packet 2020-02-10 15:07:26 +01:00
Tomek Mrugalski
ffbe6c4722 [#1090] pkt4-send comment updated 2020-02-10 15:07:26 +01:00
Thomas Markwalder
a65be143ec [#981] Reworked DdnsParams to allow on-demand value fetching
src/lib/dhcpsrv/d2_client_cfg.*
    Moved DdnsParams to srv_config.*

src/lib/dhcpsrv/network.h
    respaced

src/lib/dhcpsrv/srv_config.*
    DdnsParams relocated here from d2_client_cfg.*.
    Added SubnetPtr member.
    Added constructors from Subnet4Ptr and Subnet6Ptr
    Replaced individual members with getters.

src/lib/dhcpsrv/tests/d2_client_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
    Retrofitted tests accordingly.

src/lib/dhcpsrv/alloc_engine.*
src/lib/dhcpsrv/d2_client_mgr.*
    Updated DdnsParams references

src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/tests/fqdn_unittest.cc
    Updated DdnsParams references

src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/tests/fqdn_unittest.cc
    Updated DdnsParams references
2020-01-27 12:55:24 -05:00
Razvan Becheriu
59ecbbb61a [#1040] address review 2020-01-24 12:27:09 +00:00
Razvan Becheriu
d5e45c7863 [#1040] address review 2020-01-24 12:27:09 +00:00
Razvan Becheriu
c41e32f709 [#1040] handle update and delete 2020-01-24 12:27:09 +00:00
Razvan Becheriu
364bbbf3d4 [#1040] handle update and delete 2020-01-24 12:27:09 +00:00
Francis Dupont
37a435177b [#950] Addressed comments 2020-01-23 15:31:31 +01:00
Francis Dupont
68df26f36e [950-harden-deferred-unpack] Hardened deffered unpacking so it no longer throws 2020-01-23 15:09:42 +01:00
Razvan Becheriu
01eba32f6a [1040] separated delete functions 2020-01-10 17:41:35 +02:00
Stephen Morris
08381e6773 [#640] Simplification of fuzzing structure
Instead of using a separate thread to read input from the fuzzer,
the input is now read in the main thread and transferred to the
interface on which Kea is expecting it to appear.
2019-12-20 17:55:45 +00:00
Stephen Morris
57e98c22f8 [#640] Major refactoring of fuzzing code
1. Convert to C++ class.
2. Extend framework to support DHCPv4 fuzzing.
3. Restrict size of data that can be accepted from AFL. (Kea will
   only accept up to about 64k or data, (set by the size of a UDP
   datagram).  However, AFL can send much larger data packets,
   which may cause problems in synchronization between the two
   threads used to implement fuzzing in Kea.
2019-12-20 17:55:45 +00:00
Francis Dupont
e064013bb0 [#897] Addressed final comments and added a ChangeLog entry 2019-12-10 21:45:59 +01:00
Francis Dupont
b1fb6811ff [#897] Addressed comments 2019-12-10 21:05:02 +01:00
Francis Dupont
6c785d6c5f [897-add-infinite-valid-lifetime-for-bootp] Added comments about T1/T2 vs infinite valid lifetime 2019-12-10 21:05:02 +01:00
Francis Dupont
e219cc9d27 [897-add-infinite-valid-lifetime-for-bootp] Added BOOTP client class 2019-12-10 21:05:02 +01:00
Francis Dupont
c2f06c48ae [897-add-infinite-valid-lifetime-for-bootp] Reported previous changes 2019-12-10 21:05:02 +01:00
Francis Dupont
37196e0a98 [992-include-the-client-supplied-ciaddr-when-acking-dhcpinform] Copy ciaddr to inform responses 2019-12-09 11:47:06 +01:00
Francis Dupont
47e709fb7b [677-kea4-not-honouring-the-p-switch] Improved -p support 2019-10-24 21:40:08 +02:00
Thomas Markwalder
7cfc5d3fd3 [#35,!517] Addressed review comments
Addressed a myriad of minor typos and wording issues.

modified:
ChangeLog
doc/examples/kea4/all-keys.json
doc/examples/kea6/all-keys.json
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/fqdn_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/d2_unittest.cc
src/bin/dhcp6/tests/fqdn_unittest.cc
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/d2_client_cfg.h
src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/srv_config.h
2019-10-10 08:36:39 -04: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
Thomas Markwalder
83d5b63334 [#821,!501] kea-dhcp4 now sanity checks inbound messages
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processRequest()
    Dhcpv4Srv::processRelease()
    Dhcpv4Srv::processDecline()
    Dhcpv4Srv::processInform() - now all call sanityCheck()

src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
    TEST_F(Dhcpv4SrvTest, sanityCheckDiscover)
    TEST_F(Dhcpv4SrvTest, sanityCheckRequest)
    TEST_F(Dhcpv4SrvTest, sanityCheckDecline)
    TEST_F(Dhcpv4SrvTest, sanityCheckRelease)
    TEST_F(Dhcpv4SrvTest, sanityCheckInform) - new tests

src/lib/testutils/gtest_utils.h
    New file with handy new test macros:
        EXPECT_THROW_MSG()
        ASSERT_THROW_MSG()

src/lib/testutils/Makefile.am
    Added new file gtest_utils.h

Added a ChangeLog entry
2019-09-06 09:29:48 -04:00
Franciszek Gorski
3e5d57870f [755-Kea-DHCP-servers-observations-should-be-reset] resolve threads 2019-09-06 11:34:54 +02:00
Franciszek Gorski
61cda1b5e1 [755-Kea-DHCP-servers-observations-should-be-reset-to-some-initial] changes to way of initial values 2019-09-06 11:34:54 +02:00