]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2832] address review comments
authorAndrei Pavel <andrei@isc.org>
Tue, 16 May 2023 09:05:52 +0000 (12:05 +0300)
committerAndrei Pavel <andrei@isc.org>
Tue, 16 May 2023 12:38:54 +0000 (15:38 +0300)
Makefile.am
src/lib/yang/translator_config.cc
src/share/yang/modules/kea-dhcp-types@2023-05-31.yang
src/share/yang/modules/kea-dhcp6-server@2023-05-31.yang

index d8f38b8da565f14fb17f57a4634c46019b1ceb0e..6aaddfef9895790d9787cd4f4675c205ddb46ca2 100644 (file)
@@ -19,7 +19,9 @@ DISTCHECK_MYSQL_CONFIGURE_FLAG=@DISTCHECK_MYSQL_CONFIGURE_FLAG@
 DISTCHECK_PGSQL_CONFIGURE_FLAG=@DISTCHECK_PGSQL_CONFIGURE_FLAG@
 DISTCHECK_GSSAPI_CONFIGURE_FLAG=@DISTCHECK_GSSAPI_CONFIGURE_FLAG@
 DISTCHECK_LIBYANG_CONFIGURE_FLAG=@DISTCHECK_LIBYANG_CONFIGURE_FLAG@
+DISTCHECK_LIBYANGCPP_CONFIGURE_FLAG=@DISTCHECK_LIBYANGCPP_CONFIGURE_FLAG@
 DISTCHECK_SYSREPO_CONFIGURE_FLAG=@DISTCHECK_SYSREPO_CONFIGURE_FLAG@
+DISTCHECK_SYSREPOCPP_CONFIGURE_FLAG=@DISTCHECK_SYSREPOCPP_CONFIGURE_FLAG@
 
 OVERALL_COVERAGE_DIR=$(abs_top_builddir)/coverage-cpp-html
 
index c560b526b7a801243c9befbf147c7828dc30c676..fd4d89ab1e6f701d25d849c7c4ae3404e724d378 100644 (file)
@@ -189,7 +189,6 @@ TranslatorConfig::getServerKeaDhcpCommon(DataNode const& data_node) {
 
     checkAndGetLeaf(result, data_node, "allocator");
     checkAndGetLeaf(result, data_node, "cache-max-age");
-    checkAndGetLeaf(result, data_node, "cache-max-age");
     checkAndGetLeaf(result, data_node, "cache-threshold");
     checkAndGetLeaf(result, data_node, "calculate-tee-times");
     checkAndGetLeaf(result, data_node, "dhcp4o6-port");
@@ -237,8 +236,6 @@ TranslatorConfig::getServerKeaDhcpCommon(DataNode const& data_node) {
     checkAndGet(result, data_node, "compatibility",
                 [&](DataNode const& node) -> ElementPtr const {
                     ElementPtr compatibility(Element::createMap());
-                    checkAndGetLeaf(compatibility, node, "exclude-first-last-24");
-                    checkAndGetLeaf(compatibility, node, "ignore-dhcp-server-identifier");
                     checkAndGetLeaf(compatibility, node, "ignore-rai-link-selection");
                     checkAndGetLeaf(compatibility, node, "lenient-option-parsing");
                     return compatibility;
@@ -345,6 +342,22 @@ TranslatorConfig::getServerKeaDhcp4() {
     checkAndGetLeaf(result, config, "offer-lifetime");
     checkAndGetLeaf(result, config, "server-hostname");
 
+    checkAndGet(result, config, "compatibility",
+                [&](DataNode const& node) -> ElementPtr const {
+                    // If it exists, add to the existing compatibility map created in getServerKeaDhcpCommon.
+                    ConstElementPtr const_compatibility(result->get("compatibility"));
+                    ElementPtr compatibility;
+                    if (const_compatibility) {
+                        compatibility = copy(const_compatibility);
+                    } else {
+                        compatibility = Element::createMap();
+                    }
+
+                    checkAndGetLeaf(compatibility, node, "exclude-first-last-24");
+                    checkAndGetLeaf(compatibility, node, "ignore-dhcp-server-identifier");
+                    return compatibility;
+                });
+
     // Handle interfaces.
     ElementPtr interfaces_config(getInterfacesKea(config));
     if (interfaces_config) {
index 2daca51164a6d51458b64abe55dded08f1241b14..894e12b967b263fb16506c861452a3ff0054d17c 100644 (file)
@@ -1228,7 +1228,7 @@ module kea-dhcp-types {
     leaf pd-allocator {
       type string;
       description
-        "the allocation strategy for delegted prefixes";
+        "the allocation strategy for delegated prefixes";
     }
   }
 
index b1d13639917597dedb716149615df8cf4303350c..18ea0c718212eed7d0200b447d0917b3c7dbf871 100644 (file)
@@ -21,8 +21,8 @@ module kea-dhcp6-server {
                used to configure and manage a Kea DHCPv6 server.";
 
   revision 2023-05-31 {
-    description "Added allocator, ddns-ttl-percent, offer-lifetime,
-                 pd-allocator, read-timeout, tcp-user-timeout, write-timeout.
+    description "Added allocator, ddns-ttl-percent, pd-allocator,
+                 read-timeout, tcp-user-timeout, write-timeout.
                  Removed contact-points, keyspace.";
   }