]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3683] Addressed soem comments
authorFrancis Dupont <fdupont@isc.org>
Fri, 28 Feb 2025 00:08:03 +0000 (01:08 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 4 Mar 2025 21:49:13 +0000 (22:49 +0100)
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/hooks-run-script.rst
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/tests/dhcp6_client.h
src/bin/dhcp6/tests/dhcp6_test_utils.cc
src/bin/dhcp6/tests/dhcp6_test_utils.h

index 4a9b2dadbb4a55699b2050bc9b906a67ebac71a3..ae9f1c90c3548e893b567f2fef661646e073a702 100644 (file)
@@ -6853,7 +6853,7 @@ Address Registration (RFC 9686 Support)
 
 Kea version 2.7.7 introduces the support of self-generated address registration
 as defined in `RFC 9686 <https://tools.ietf.org/html/rfc9686>`__ i.e.
-when a valid ADDR-REG-INFORM (36) message in received a registered lease is
+when a valid ADDR-REG-INFORM (36) message is received a registered lease is
 added or updated and a ADDR-REG-REPLY (37) is sent back to the client.
 
 .. note::
@@ -6861,7 +6861,7 @@ added or updated and a ADDR-REG-REPLY (37) is sent back to the client.
    Even if they share a common lease database with leases in other states,
    registered leases are independent: when a lease in another state already
    exists for an address this address in considered as in use and can't be
-   registered. In the other way a registered lease can't change to another
+   registered. Similarly a registered lease can't change to another
    state, e.g. reclaimation of expired registered leases removes them.
 
 .. note::
@@ -7587,8 +7587,8 @@ The DHCPv6 server supports the following statistics:
    | subnet[id].cumulative-registered                  | integer        | Cumulative number of NA addresses  |
    |                                                   |                | in a given subnet that were        |
    |                                                   |                | registered. It increases every     |
-   |                                                   |                | a new address is registered (as a  |
-   |                                                   |                | result of receiving an             |
+   |                                                   |                | time a new address is registered   |
+   |                                                   |                | (as a result of receiving an       |
    |                                                   |                | ADDR-REG-INFORM message) and is    |
    |                                                   |                | never decreased. The *id* is the   |
    |                                                   |                | subnet ID of a given subnet. This  |
index fddfa49138514a6b5cfc662957cca20f5963c8c4..b8912b7974dd776682a048b22e67d50427439ec0 100644 (file)
@@ -678,7 +678,7 @@ at 0.
    NEW_LEASE6_PREFIX_LEN
    NEW_LEASE6_TYPE
 
-The OLD_LEASE6 do not always exists.
+The OLD_LEASE6 does not always exist.
 
 The leases4_committed hook point needs for loops to handle the list of addresses.
 This can be achived in the following way:
index aa362c709e2a00d72a0d8e8f56e236b7ae34baa6..183375c68ceeeaef1b99984beaebf9e9d3d814c4 100644 (file)
@@ -51,12 +51,12 @@ option to an IA. The first argument includes the client and the
 transaction identification information. The second argument specifies
 the IAID. The third argument includes the details of the status code.
 
-% DHCP6_ADDR_REG_INFORM_FAIL error on addr-reg-inform from client %1: %2
-This information message is issued when the processing of an addr-reg-inform
+% DHCP6_ADDR_REG_INFORM_FAIL error on ADDR-REG-INFORM from client %1: %2
+This information message is issued when the processing of an ADDR-REG-INFORM
 message failed. The address of the client, usually also the address to
 register, and the description of the problem are printed.
 
-% DHCP6_ADDR_REG_INFORM_CLIENT_CHANGE received an addr-reg-inform for %1 from client '%2' but the address was registered by another client '%3'
+% DHCP6_ADDR_REG_INFORM_CLIENT_CHANGE received an ADDR-REG-INFORM for %1 from client '%2' but the address was registered by another client '%3'
 This information message is issued when a lease for another client already
 exists for an address being registered. The address, the new client and
 previous client identifiers are printed.
@@ -380,7 +380,7 @@ and the expression specified in its configuration generated (was evaluated to)
 an identifier for incoming packet. This debug message is mainly intended as a
 debugging assistance for flexible identifier.
 
-% DHCP6_HOOK_ADDR6_REGISTER_SKIP %1: addr-reg-inform for %2 is dropped, because a callout set the next step to SKIP
+% DHCP6_HOOK_ADDR6_REGISTER_SKIP %1: ADDR-REG-INFORM for %2 is dropped, because a callout set the next step to SKIP
 Logged at debug log level 40.
 This debug message is printed when a callout installed on the addr6_register
 hook point sets the next step to SKIP. For this particular hook point, the
index c3966bae4901b861249ef42e32f6699ecb967ddd..e26ee42a696ccc47984ee14a7da532a70660ceff 100644 (file)
@@ -311,7 +311,7 @@ public:
     /// and receiving server's response.
     void doRelease();
 
-    /// @brief This function generates Addr-reg-inform message, sends it
+    /// @brief This function generates an Addr-reg-inform message, sends it
     /// to the server and then receives the Addr-reg-reply.
     /// This method does not process the response in any specific way,
     /// just stores it.
index 7b5c9daeb0b4f7343f026ebf0afd51c4d6db79de..fed2be0d615c3e7b624a2a89311a06486a4d41db 100644 (file)
@@ -1092,6 +1092,8 @@ NakedDhcpv6SrvTest::~NakedDhcpv6SrvTest() {
         .deregisterAllCallouts("pkt6_receive");
     isc::hooks::HooksManager::preCalloutsLibraryHandle()
         .deregisterAllCallouts("pkt6_send");
+    isc::hooks::HooksManager::preCalloutsLibraryHandle()
+        .deregisterAllCallouts("subnet6_select");
     isc::hooks::HooksManager::preCalloutsLibraryHandle()
         .deregisterAllCallouts("addr6_register");
 }
index 7fe4b4c6cb698b2c33eb8bd603e3ce9f628897a2..5cdddaec4ae4b1f88d84d955b53f64ff73cc7bbf 100644 (file)
@@ -349,13 +349,13 @@ public:
     ///
     /// @param addr_reg_inf a message received from client
     /// @return Addr-reg-reply message or null
-    Pkt6Ptr processAddrRegInform(const Pkt6Ptr& decline) {
+    Pkt6Ptr processAddrRegInform(const Pkt6Ptr& addr_reg_inf) {
         AllocEngine::ClientContext6 ctx;
-        bool drop = !earlyGHRLookup(decline, ctx);
+        bool drop = !earlyGHRLookup(addr_reg_inf, ctx);
         if (drop) {
             return (Pkt6Ptr());
         }
-        ctx.subnet_ = selectSubnet(decline, drop);
+        ctx.subnet_ = selectSubnet(addr_reg_inf, drop);
         if (drop) {
             return (Pkt6Ptr());
         }