diff options
author | Razvan Becheriu <razvan@isc.org> | 2024-04-26 14:31:24 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2024-04-26 17:25:46 +0200 |
commit | 6b9388d9a12c4db5fa0ca20aedd461e53133bb31 (patch) | |
tree | 777a4fa6fbeb998c1ce745d282703b6bca976a25 | |
parent | [#2976] Added doc and ChangeLog entry (diff) | |
download | kea-6b9388d9a12c4db5fa0ca20aedd461e53133bb31.tar.xz kea-6b9388d9a12c4db5fa0ca20aedd461e53133bb31.zip |
[#2976] addressed review
-rw-r--r-- | doc/sphinx/arm/dhcp4-srv.rst | 12 | ||||
-rw-r--r-- | src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 24 | ||||
-rw-r--r-- | src/bin/dhcp4/tests/dora_unittest.cc | 9 |
3 files changed, 22 insertions, 23 deletions
diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index e55158b78d..4c5fd4b78a 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -4506,15 +4506,15 @@ Stash Agent Options ------------------- Introduced in version 2.5.8 the ``stash-agent-options`` global parameter -when set to ``true`` (its default is ``false``) allows to solve a common +when set to ``true`` (defaults to ``false``) allows to solve a common problem with host reservations using an identifier based on the content -of the dhcp-agent-options option inserted relays. When a client tries +of the dhcp-agent-options option inserted by relays. When a client tries to renew its reserved address the request is sent directly to the server -so no through the relay: the server is not able to recognize the client +so not through the relay: the server is not able to recognize the client as the host identifier can't be found in a direct request. -Set in flex-id (:ref:`hooks-flex-id`) the ``replace-client-id`` to ``true`` -allows to use the same identifier for leases and host reservations. +Setting in flex-id (:ref:`hooks-flex-id`) the ``replace-client-id`` to ``true`` +allows the use of the same identifier for leases and host reservations. This solves some problems but not this one. In fact this configuration is incompatible with ``stash-agent-options``. @@ -4526,7 +4526,7 @@ server behaves as the option was included. .. note:: - Here belongs to the client is implemented the same way as for Releases. + Belongs to the client here is implemented the same way as for Releases. This guarantees the security of the feature but does not allow the use the same identity for both leases and host reservations based on the content of the dhcp-agent-options option, i.e. if the client changes diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc index 0b16a9d5a4..389f393eb4 100644 --- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc @@ -5293,37 +5293,37 @@ public: LeaseMgrFactory::destroy(); } - /// RAI definition. + /// @brief RAI definition. static OptionDefinitionPtr rai_def_; - /// Client address. + /// @brief Client address. IOAddress addr_; - /// Query. + /// @brief Query. Pkt4Ptr query_; - /// Hardware address. + /// @brief Hardware address. HWAddrPtr hwaddr_; - /// RAI option. + /// @brief RAI option. OptionPtr rai_; - /// RAI suboption. + /// @brief RAI suboption. OptionPtr rai_sub_; - /// Lease. + /// @brief Lease. Lease4Ptr lease_; - /// Lease user context. + /// @brief Lease user context. ElementPtr user_context_; - /// ISC map. + /// @brief ISC map. ElementPtr isc_; - /// Relay agent info (map or string). + /// @brief Relay agent info (map or string). ElementPtr relay_agent_info_; - /// Sub-options i.e. RAI content (hexstring). + /// @brief Sub-options i.e. RAI content (hexstring). ElementPtr sub_options_; }; @@ -5568,7 +5568,7 @@ TEST_F(StashAgentOptionTest, iscEntry) { } // Verify that the ISC entry in the lease user context must be a map. -// getLeaseClientClasses throws BadValue on addLease.} +// getLeaseClientClasses throws BadValue on addLease. // Verify that the relay-agent-info entry is required. TEST_F(StashAgentOptionTest, relayAgentInfoEntry) { diff --git a/src/bin/dhcp4/tests/dora_unittest.cc b/src/bin/dhcp4/tests/dora_unittest.cc index bc0122b8ab..bebc846bee 100644 --- a/src/bin/dhcp4/tests/dora_unittest.cc +++ b/src/bin/dhcp4/tests/dora_unittest.cc @@ -973,20 +973,19 @@ public: /// @brief Checks that features related to lease caching (such as lease reuse statistics) work. void leaseCaching(); - /// @brief Checks that stash-agent-options enables direct renewall + /// @brief Checks that stash-agent-options enables direct renewal /// of addresses from pool allocation for a relayed client. /// /// @note: no negative counterpart as the stash-agent-options is not /// required for this scenario. void stashAgentOptions(); - /// @brief Checks that stash-agent-options enables direct renewall + /// @brief Checks that stash-agent-options enables direct renewal /// of addresses from host reservation using the relay-agent-info option. void stashAgentOptionsReservation(); - /// @brief Checks that stash-agent-options is required for direct - /// renewall of addresses from host reservation using the - /// relay-agent-info option. + /// @brief Checks that stash-agent-options is required for direct renewal + /// of addresses from host reservation using the relay-agent-info option. void noStashAgentOptionsReservation(); /// @brief Checks the value of a statistic. |