]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3084] Addressed minor review comments
authorThomas Markwalder <tmark@isc.org>
Mon, 20 Nov 2023 13:48:08 +0000 (08:48 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 21 Nov 2023 12:08:56 +0000 (12:08 +0000)
Fixed minor issues.

modified:
    src/bin/dhcp4/dhcp4_messages.mes
    src/bin/dhcp4/dhcp4_srv.cc
    src/bin/dhcp4/dhcp4_srv.h

src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.h

index 8a7274acd5adbf2b81b114beeee4b74e0205c9a9..fdf6b9525960180d9561f8976a16a60a4d4df08b 100644 (file)
@@ -1075,7 +1075,7 @@ the underlying problem of a misconfigured or rogue device is not solved, this
 address may be declined again in the future.
 
 % DHCP4_HOOK_LEASE4_OFFER_ARGUMENT_MISSING hook callouts did not set an argument as expected %1 for %2
-This debug message is printed when none of the callouts installed on the
+This error message is printed when none of the callouts installed on the
 lease4_offer hook point set an expected argument in the callout status.
 This is a programming error in the installed hook libraries.  Details of
 the argument and the query in process at the time are provided log arguments.
index 816fc3e1689eccc462b6aeae0b89bf98fbd9e1d4..7b05c043a16f821ab9ceb3655e9e820a72f092da 100644 (file)
@@ -1515,10 +1515,9 @@ Dhcpv4Srv::processDhcp4Query(Pkt4Ptr& query, Pkt4Ptr& rsp,
                         if (hook_idx == Hooks.hook_index_lease4_offer_) {
                             bool offer_address_in_use = false;
                             try {
-                                callout_handle->getArgument("offer-address-in-use", offer_address_in_use);
+                                callout_handle->getArgument("offer_address_in_use", offer_address_in_use);
                             } catch (const NoSuchArgument& ex) {
-                                LOG_DEBUG(hooks_logger, DBG_DHCP4_HOOKS,
-                                          DHCP4_HOOK_LEASE4_OFFER_ARGUMENT_MISSING)
+                                LOG_ERROR(hooks_logger, DHCP4_HOOK_LEASE4_OFFER_ARGUMENT_MISSING)
                                           .arg(query->getLabel())
                                           .arg(ex.what());
                             }
@@ -4020,7 +4019,7 @@ Dhcpv4Srv::serverDecline(hooks::CalloutHandlePtr& /* callout_handle */, Pkt4Ptr&
     // Let's check if there are hooks installed for server decline hook point.
     // If they are, let's pass the lease and client's packet.  Note this code
     // has never been compiled, it is just an initial draft.
-    if (HooksManager::calloutsPresent(Hooks.hook_index_lease4_server_decline)) {
+    if (HooksManager::calloutsPresent(Hooks.hook_index_lease4_server_decline_)) {
         CalloutHandlePtr callout_handle = getCalloutHandle(decline);
 
         // Use the RAII wrapper to make sure that the callout handle state is
index a5d6955eceef6da932e7f1edb487a5e38b72a8ce..52346e8decbdcb4878b8fa41715573c71900e4fb 100644 (file)
@@ -816,14 +816,14 @@ protected:
     ///
     /// This function is invoked during the unpark callback for the lease4-offer
     /// hook point, if a hook callout has set the handle status to NEXT_STEP_DROP.
-    /// It will create/update the lease to DECLINED state in the lease database,
+    /// It will create/update the lease to DECLINED state in the lease store,
     /// update the appropriate stats, and @todo implement a new hook point,
     /// lease4-server-declined-lease (name subject to change).
     ///
     /// @param callout_handle - current callout handle
     /// @param query - DHCPDISCOVER which instigated the declination.
-    /// @param lease - lease to decline (i.e lease that would have offered)
-    /// @param lease_exists - true if the lease already exists in the database
+    /// @param lease - lease to decline (i.e lease that would have been offered)
+    /// @param lease_exists - true if the lease already exists in the lease store
     /// (as is the case when offer-lifetime is > 0)
     void serverDecline(hooks::CalloutHandlePtr& callout_handle, Pkt4Ptr& query,
                        Lease4Ptr lease, bool lease_exists);
@@ -835,8 +835,8 @@ protected:
     ///
     /// @param callout_handle - current callout handle
     /// @param query - DHCPDISCOVER which instigated the declination.
-    /// @param lease - lease to decline (i.e lease that would have offered)
-    /// @param lease_exists - true if the lease already exists in the database
+    /// @param lease - lease to decline (i.e lease that would have been offered)
+    /// @param lease_exists - true if the lease already exists in the lease store
     /// (as is the case when offer-lifetime is > 0)
     void serverDeclineNoThrow(hooks::CalloutHandlePtr& callout_handle, Pkt4Ptr& query,
                               Lease4Ptr lease, bool lease_exists);