Also, some other corrections.
+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)
// 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,
+----------------------------------------+------+---------------------------+-------------+-------------+
| 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 |
+----------------------------------------+------+---------------------------+-------------+-------------+
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);
/// @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
ASSERT_THROW(option->pack(output_buf), isc::OutOfRange);
}
-} // namespace
\ No newline at end of file
+} // namespace