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

755 Commits

Author SHA1 Message Date
Thomas Markwalder
45e78cdcec [#1584] Addressed minor review comments
modified:   src/bin/dhcp4/dhcp4_srv.cc
2021-10-21 13:32:16 -04:00
Thomas Markwalder
65d31e57b2 [#1584] Suppress v4 NAKs for unknown addresses
kea-dhcp4 no longer NAKs when the client DHCPREQUESTs
an address that the server does not know.

Added ChangeLog entry

src/bin/dhcp4/dhcp4_messages.*
    DHCP4_UNKNOWN_ADDRESS_REQUESTED - new log message

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::assignLease() - added logic to drop NAKs when
    the address is not managed the server.

src/bin/dhcp4/tests/dora_unittest.cc
src/bin/dhcp4/tests/hooks_unittest.cc
src/bin/dhcp4/tests/out_of_range_unittest.cc
    updated tests

src/lib/dhcpsrv/alloc_engine.*
    AllocEngine::ClientContext4 - added unknown_requested_addr_ flag
    AllocEngine::requestLease4(AllocEngine::ClientContext4& ctx) - sets
    unknown_requested_addr_ flag
2021-10-21 13:32:16 -04:00
Thomas Markwalder
f14163b51e [#1307] kea-dhcp4 now enforces parked-packet-limit
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processDhcp4Query() - now drops packet and response
    if parking lot size reaches parked-packet-limit

src/bin/dhcp4/dhcp4_messages.*
    DHCP4_HOOK_LEASES4_PARKING_LOT_FULL - new message
2021-09-17 11:10:34 -04:00
Tomek Mrugalski
c78cd3ef7a [#1915] Reverted change in DHCP4_HOOK_BUFFER_RCVD_SKIP 2021-06-25 18:57:55 +03:00
Tomek Mrugalski
320f2d2b97 [#1915] Converted some logs to PKT_HANDLING level 2021-06-25 18:57:55 +03:00
Tomek Mrugalski
af3fa21939 [#1915] DROP reasons are now debuglevel 15 2021-06-25 18:56:53 +03:00
Razvan Becheriu
7f5376d634 [#1836] updated documentation 2021-06-25 17:09:04 +03:00
Razvan Becheriu
eb378d8f8f [#1836] addressed comments 2021-06-25 17:08:31 +03:00
Razvan Becheriu
f04bb7b3a8 [#1836] get server identifier from client class value 2021-06-25 17:08:31 +03:00
Andrei Pavel
272b4f57d3 [#1894] limit docsis oro lookup to cable labs 4491 2021-06-25 16:24:35 +03:00
Andrei Pavel
70b36a14f1 [#1721] proper JSON path algorithm redaction 2021-05-21 13:22:00 +00:00
Andrei Pavel
8c7c23451b [#1721] Dhcpv[46]Srv::redactConfig 2021-05-21 13:22:00 +00:00
Thomas Markwalder
3df9289069 [#1818] Added Multithreading CS callbacks to HA
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::run() - added CS prior to MultiThreadingMgr:apply()
    prior to exit

src/bin/dhcp6/dhcp6_srv.cc
    Dhcpv6Srv::run() - added CS prior to MultiThreadingMgr:apply()
    prior to exit

src/hooks/dhcp/high_availability/ha_service.*
    HAService::startClientAndListener() - added call to register
    CS callbacks

    HAService::stopClientAndListener() - added call to remove CS
    callbacks

src/hooks/dhcp/high_availability/tests/ha_mt_unittest.cc
    Revamped to test CS callbacks rather than pause/resume directly.

src/lib/util/Makefile.am
    Added named_callbacks.h/cc

src/lib/util/named_callback.cc
src/lib/util/named_callback.h
    - new files that implement an ordered list of named callbacks

src/lib/util/multi_threading_mgr.*
    MultiThreadingMgr::apply() - removes all CS callbacks when entering
    single-threaded mode

    MultiThreadingMgr::stopProcessing() - formerly stopPktProcessing, added
    call to invoke CS exit callbacks

    MultiThreadingMgr::startProcessing()  - formerly startPktProcessing,
    added call to invoke CS entry callbacks.

    MultiThreadingMgr::addCriticalSectionCallbacks() - new method for
    adding CS callbacks

    MultiThreadingMgr::removeCriticalSectionCallbacks() -  new method for
    removing CS callbacks

    MultiThreadingMgr::removeAllCriticalSectionCallbacks() - new method for
    all CS callbacks

src/lib/util/tests/Makefile.am
    Added named_callback_unittest.cc

src/lib/util/tests/named_callback_unittest.cc - tests for NamedCallback
classes

src/lib/util/tests/multi_threading_mgr_unittest.cc
    CriticalSectionCallbackTest - new test fixture
    TEST_F(CriticalSectionCallbackTest, basics) - new test
2021-05-19 16:14:16 -04:00
Francis Dupont
0a593e640f [(no branch, rebasing 1815-add-new-drop-points)] [#1815] Removed blank lines 2021-05-19 17:20:35 +02:00
Francis Dupont
bc25aa5e10 [(no branch, rebasing 1815-add-new-drop-points)] [(no branch, rebasing 1815-add-new-drop-points)] [#1815] Spelling 2021-05-19 17:20:35 +02:00
Francis Dupont
02596244f5 [(no branch, rebasing 1815-add-new-drop-points)] [(no branch, rebasing 1815-add-new-drop-points)] [#1815] Checkpoint: v4 part done 2021-05-19 17:20:35 +02:00
Razvan Becheriu
bd91e0b252 [#1680] consistent order of parameters in hook points 2021-05-05 20:12:17 +03:00
Thomas Markwalder
feb7c199ab [#1733] Addressed review comments
Minor clean-up and typos.

src/hooks/dhcp/high_availability/ha_impl.cc
    HAImpl::leases4Committed()
    HAImpl::leases6Committed() - added try-catch to ensure
    we call dereference on error
2021-04-12 10:37:04 -04:00
Thomas Markwalder
1cdf44974e [#1733] Revised parking lot rules
Reversed parking rules: now an object must be parked before
it can be referenced instead of the other way around.

src/bin/dhcp4/dhcp4_srv.cc
    Commentary clean up

src/hooks/dhcp/high_availability/ha_impl.cc
    HAImpl::leases4Committed() - modified to create the parking
    lot reference before calling asyncSendLeaseUpdates(), and
    remove it if the function returns 0 indicating no updates to
    wait upon.

src/lib/hooks/hooks_manager.h
    HooskManager::park() - revert addition of require_reference_ parameter.

src/lib/hooks/parking_lots.h
    A parked object can only be parked once.
    A reference may only be created (or removed) if the object has been parked.

    reference() and dereference() return the new reference count.

src/lib/hooks/tests/hooks_manager_unittest.cc
    Updated to tests to park first, reference, and then call callouts.

src/lib/hooks/tests/parking_lots_unittest.cc
    Modified tests to reflect new behavior.
2021-04-12 10:37:04 -04:00
Thomas Markwalder
e63033adbe [#1733] kea-dhcp4 now implements Core Packet Parking
Initial working implementation.

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processDhcp4Query() - reworked to
    proactively park the packet if lease4_commited callouts
    are installed.

src/lib/hooks/hooks_manager.h
    HooksManager::park() - added require_reference parameter

src/lib/hooks/parking_lots.h
    ParkingLot::park() - set refcount to zero, when added
    without pre-existing reference
2021-04-12 10:37:04 -04:00
Razvan Becheriu
59ce7cd57c [#899] fixed log messages 2021-02-18 19:23:57 +02:00
Razvan Becheriu
9adc0b96bf [#899] use IOSignalSet to handle signals 2021-02-18 19:23:57 +02:00
Razvan Becheriu
812fb67d8b [#899] fixed hook point arguments 2021-02-18 19:14:26 +02:00
Thomas Markwalder
5b1a9a282b [#1672] Addressed review comments
ChangeLog
    Added configuration change notice

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::setFixedFields - added commentary and
    use of IPV4_ZERO_ADDRESS
2021-02-16 07:10:26 -05:00
Thomas Markwalder
730888d98d [#1672] class fixed field order now matches class option order in kea-dhc4
src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::setFixedFields - modified to use the value for a field
    from the first class in query's list of classes that specifies
    the field.

src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
    TEST_F(Dhcpv4SrvTest, fixedFieldsInClassOrder) - new unit test
2021-02-14 13:16:34 -05:00
Andrei Pavel
c53e135833 [#1656] 1.9.4 release: update copyrights 2021-01-25 13:52:09 +02:00
Francis Dupont
38ba6b502d [#1418] Addressed some comments 2021-01-11 16:05:46 +01:00
Francis Dupont
615465ece6 [#1418] Changed remaining_ for reusable_ 2021-01-11 16:05:46 +01:00
Francis Dupont
e78fbe1a4f [#1418] Checkpoint: preparation code done 2021-01-11 16:05:46 +01:00
Francis Dupont
69ea445f59 [#1449] Addressed ultimate comment 2020-12-02 16:24:05 +01:00
Francis Dupont
834ba9aca7 [#1449] Addressed comments 2020-12-02 12:25:08 +01:00
Francis Dupont
7c5455e5a6 [#1449] Fixed v6 appending multiple option instances 2020-12-02 11:35:21 +01:00
Razvan Becheriu
af961077a0 [#1405] addressed comments 2020-11-18 15:55:24 +02:00
Razvan Becheriu
f06b3ffde9 [#1405] ignore out of pool if in subnet is disabled 2020-11-18 15:55:24 +02:00
Razvan Becheriu
d26a72f560 [#1405] merged second pass 2020-11-18 15:55:23 +02:00
Thomas Markwalder
eb68fc3b81 [#1385] kea-dhcp6 supports ddns-update-on-renew
(Parsers need to be regenerated)

    src/bin/dhcp6/dhcp6_lexer.ll
    src/bin/dhcp6/dhcp6_parser.yy
    src/bin/dhcp6/json_config_parser.cc
        added ddns-update-on-renew parameter

    src/bin/dhcp6/dhcp6_srv.*
        Dhcpv4Srv::createNameChangeRequests() - modified to
        use ddns-update-on-renew in logic

    src/bin/dhcp6/tests/fqdn_unittest.cc
        TEST_F(FqdnDhcpv6SrvTest, processRequestRenew) - new test

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

    doc/examples/kea4/all-keys.json
    doc/examples/kea6/all-keys.json
        added ddns-update-on-renew parameter
2020-10-09 16:51:28 +02: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
Francis Dupont
9781fcd94a [#1389] Minor comment improvements 2020-09-25 07:36:03 +00:00
Thomas Markwalder
52f2901728 [#1389] Initial v4 review comments 2020-09-25 07:36:03 +00:00
Thomas Markwalder
02ef7e59f7 [#1389] V4 uses DDNS parameters from correct subnet
Initial commit. Need to add unit tests.

src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processClientName - added logic to populate the
    context with hostname and dns flags. Formerly this was in assignLeases.

    Dhcpv4Srv::assignLease - now calls processClientName() before allocating
    the lease, and after IF the selected subnet changes. Removed logic to
    update name from reservation.

    Dhcpv4Srv::processDiscover
    Dhcpv4Srv::processRequest -  no longer calls processClientName

    Dhcpv4Srv::processHostnameOption - now it always uses hostname supplied
    by a reservation.  Eliminates need for post-allocation update.

    Dhcpv4Srv::postAllocateNameUpdate - contains logic extracted from assignLeases

src/lib/dhcpsrv/alloc_engine.cc
    AllocEngine::ClientContext6::getDdnsParams
    AllocEngine::ClientContext4::getDdnsParams -
    recreates DdnsParameter instance if it is stale.
2020-09-25 07:36:03 +00:00
Francis Dupont
2c2dfd8f0c [#1333] Improved comment 2020-09-18 16:26:46 +02:00
Francis Dupont
46926f290e [#1333] Added comment 2020-09-18 16:26:46 +02:00
Francis Dupont
5e69b754cd [#1333] Added match expr check 2020-09-18 16:26:46 +02:00
Francis Dupont
0680e3e01c [#1308] No _1 ambiguities 2020-08-13 13:54:14 +00:00
Francis Dupont
2035f64c1c [#1308] Got rid of boost function/bind 2020-08-13 13:54:14 +00:00
Francis Dupont
a0a0a9160a [#553] Checkpoint: convert to use interface indexes 2020-07-07 12:47:26 +02:00
Francis Dupont
4c2dbcd065 [#1282] Checkpoint: todo HA new test 2020-06-27 17:59:10 +02:00
Francis Dupont
0997ee1b8f [#1282] Improved clearParkingLots 2020-06-27 15:54:34 +00:00
Francis Dupont
bfff71f89e [#1232] Added a try and log 2020-06-11 14:34:31 +02:00
Francis Dupont
ee5c75639a [#1147] Checkpoint: todo lease commands 2020-05-26 11:51:57 +02:00