]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3074] added ChangeLog entry
authorPiotrek Zadroga <piotrek@isc.org>
Tue, 17 Oct 2023 11:01:59 +0000 (13:01 +0200)
committerPiotrek Zadroga <piotrek@isc.org>
Tue, 9 Jan 2024 10:39:23 +0000 (11:39 +0100)
Also, some other corrections.

ChangeLog
doc/examples/kea4/all-options.json
doc/sphinx/arm/dhcp4-srv.rst
src/lib/dhcp/option_classless_static_route.cc
src/lib/dhcp/option_classless_static_route.h
src/lib/dhcp/tests/option_classless_static_route_unittest.cc

index f29831d1bc05eb46755553fb27ca4722344dff26..fb5a079571f2771427ff97aea47eafc3ec287908 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2200.  [func]          piotrek
+       Kea now supports new DHCPv4 option code 121, Classless Static Route
+       option defined in RFC 3442. Option may be defined in binary format
+       and also as a string using convenient static route notation.
+       (Gitlab #3074)
+
 2199.  [func]          marcin
        Added support for hub-and-spoke high availability configuration.
        (Gitlab #3106, #3178)
index 6c98a63bba785ba2c547fa441e12c70f84c21d1d..687f122052109dafe59a21fe566c8a6b2d8cffcc 100644 (file)
       // Type: binary
       {
         "code": 121,
-        // please mind the "single quotes inside of double quotes" syntax, when below convenience notation is used:
+        // please mind the "single quotes inside of double quotes" syntax, as well as "csv-format" set to false,
+        // when below convenience notation is used:
         // subnet1 - router1 IP addr, subnet2 - router2 IP addr, ..., subnetN - routerN IP addr
         "data": "'10.229.0.128/25 - 10.229.0.1, 10.198.122.47/32 - 10.198.122.1'",
         "csv-format": false,
index 3bcd751e90955246be82c5c8e917fbd9b4069bf6..b1e78086f856617a4df7b637762f9142e416c703 100644 (file)
@@ -2022,7 +2022,7 @@ types are given in :ref:`dhcp-types`.
    +----------------------------------------+------+---------------------------+-------------+-------------+
    | domain-search                          | 119  | fqdn                      | true        | false       |
    +----------------------------------------+------+---------------------------+-------------+-------------+
-   | classless-static-route                 | 121  | binary                    | true        | false       |
+   | classless-static-route                 | 121  | binary                    | false       | false       |
    +----------------------------------------+------+---------------------------+-------------+-------------+
    | vivco-suboptions                       | 124  | record (uint32, binary)   | false       | false       |
    +----------------------------------------+------+---------------------------+-------------+-------------+
index 816583ec6371251308b2640e166f144919d00e66..12dfbefd291b3f6808af2c828ea7ad0768ef8657 100644 (file)
@@ -102,22 +102,6 @@ OptionClasslessStaticRoute::len() const {
     return (len);
 }
 
-uint8_t
-OptionClasslessStaticRoute::calcMaskWidth(uint32_t subnet_mask) {
-    uint8_t len = 0;
-    while (subnet_mask) {
-        if (subnet_mask & 0x80000000) {
-            ++len;
-            subnet_mask <<= 1;
-            continue;
-        }
-
-        break;
-    }
-
-    return (len);
-}
-
 void
 OptionClasslessStaticRoute::addRoute(const StaticRouteTuple& route) {
     static_routes_.push_back(route);
index f0b2438ffaacdfe1d4a52571183538b73f8f5c66..2f1b1169c980848e9ab828b39c8bc98086024516 100644 (file)
@@ -83,11 +83,6 @@ private:
     /// @brief Length in octets of all encoded static routes.
     uint16_t data_len_;
 
-    /// @brief Calculates subnet mask width from given uint_32 representation of subnet mask.
-    /// @param subnet_mask uint_32 representation of a subnet mask IPv4 address
-    /// @return width of subnet mask in a range of 0-32
-    static uint8_t calcMaskWidth(uint32_t subnet_mask);
-
     /// @brief Encodes destination descriptor as per RFC3442.
     /// @param route static route tuple
     /// @return Contents of the destination descriptor as a vector
index c81fd8979d6a9fd05b97f2135f6c66ff58476c8f..6729e3265a23a9779f0cdce04486745096c384e6 100644 (file)
@@ -480,4 +480,4 @@ TEST(OptionClasslessStaticRouteTest, packThrows) {
     ASSERT_THROW(option->pack(output_buf), isc::OutOfRange);
 }
 
-}  // namespace
\ No newline at end of file
+}  // namespace