]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1710] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Fri, 20 Aug 2021 12:37:53 +0000 (08:37 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 20 Aug 2021 12:44:05 +0000 (08:44 -0400)
ChangeLog - amended entry to mention CB

doc/sphinx/arm/dhcp6-srv.rst
    updated CB supported paramters table

src/lib/dhcpsrv/alloc_engine.cc
    minor clean up

ChangeLog
doc/sphinx/arm/dhcp6-srv.rst
src/lib/dhcpsrv/alloc_engine.cc

index 5e0cab05c836bfb445839bc0523209c99456cea5..555169636faf4372c4e601dd6e9f3177f10d8d89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 1934.  [func]          tmark
        Kea-dhcp6 now supports specifying valid-lifetime and
-       preferred-lifetime values in client classes.  Prior to this
+       preferred-lifetime values in client classes (via both
+       configuration file and Config Backend).  Prior to this
        it could only be specified at the global, shared-network,
        and subnet scopes.
        (Gitlab #1710)
index c5f5086ae49e4a28ae9a1290db47bae83422925b..01821ebd79ec599935485b3fdcad978d13549b6e 100644 (file)
@@ -6894,8 +6894,12 @@ option definitions and DHCPv6 options are configured using the
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
    | interface-id                | n/a                        | n/a       | yes       | yes       | n/a       | n/a        |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
+   | max-preferred-lifetime      | yes                        | yes       | yes       | yes       | n/a       | n/a        |
+   +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
    | max-valid-lifetime          | yes                        | yes       | yes       | yes       | n/a       | n/a        |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
+   | min-preferred-lifetime      | yes                        | yes       | yes       | yes       | n/a       | n/a        |
+   +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
    | min-valid-lifetime          | yes                        | yes       | yes       | yes       | n/a       | n/a        |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
    | option-data                 | yes (via                   | yes       | yes       | yes       | yes       | yes        |
@@ -6904,7 +6908,7 @@ option definitions and DHCPv6 options are configured using the
    | option-def                  | yes (via                   | yes       | n/a       | n/a       | n/a       | n/a        |
    |                             | remote-option-def6-set)    |           |           |           |           |            |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
-   | preferred-lifetime          | yes                        | n/a       | yes       | yes       | n/a       | n/a        |
+   | preferred-lifetime          | yes                        | yes       | yes       | yes       | n/a       | n/a        |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
    | prefix                      | n/a                        | n/a       | n/a       | n/a       | n/a       | yes        |
    +-----------------------------+----------------------------+-----------+-----------+-----------+-----------+------------+
index be1cc40af322ffc2f49d88522807d66ae36363a5..085da6c697e54b40be9030eb3abeb6621eba705f 100644 (file)
@@ -1919,20 +1919,20 @@ AllocEngine::getLifetimes6(ClientContext6& ctx, uint32_t& preferred, uint32_t& v
             CfgMgr::instance().getCurrentCfg()->getClientClassDictionary();
 
         // Iterate over the assigned class defintions.
-        int cnt = 0;
-        for (ClientClasses::const_iterator name = classes.cbegin();
-             name != classes.cend() && cnt < 2; ++name) {
+        int have_both = 0;
+        for (auto name = classes.cbegin();
+             name != classes.cend() && have_both < 2; ++name) {
             ClientClassDefPtr cl = dict->findClass(*name);
             if (candidate_preferred.unspecified() &&
                 (cl && (!cl->getPreferred().unspecified()))) {
                 candidate_preferred = cl->getPreferred();
-                ++cnt;
+                ++have_both;
             }
 
             if (candidate_valid.unspecified() &&
                 (cl && (!cl->getValid().unspecified()))) {
                 candidate_valid = cl->getValid();
-                ++cnt;
+                ++have_both;
             }
         }
     }