diff options
author | Piotrek Zadroga <piotrek@isc.org> | 2023-11-22 16:57:03 +0100 |
---|---|---|
committer | Piotrek Zadroga <piotrek@isc.org> | 2024-01-09 11:40:04 +0100 |
commit | 7a9203dbfd4ad95f3cc40e122e520ee363d38825 (patch) | |
tree | 6a6b17c0b7ed46b1c5d4f9c0efa64afbaf3814a4 /src/lib | |
parent | [#3074] ARM update (diff) | |
download | kea-7a9203dbfd4ad95f3cc40e122e520ee363d38825.tar.xz kea-7a9203dbfd4ad95f3cc40e122e520ee363d38825.zip |
[#3074] addressed review comments
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dhcp/option_classless_static_route.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dhcp/option_classless_static_route.cc b/src/lib/dhcp/option_classless_static_route.cc index 5d3620386f..dd032dbb70 100644 --- a/src/lib/dhcp/option_classless_static_route.cc +++ b/src/lib/dhcp/option_classless_static_route.cc @@ -119,7 +119,7 @@ OptionClasslessStaticRoute::encodeDestinationDescriptor(const StaticRouteTuple& uint8_t OptionClasslessStaticRoute::calcSignificantOctets(const uint8_t& mask_width) { - return (mask_width / 8 + (mask_width % 8 != 0)); + return ((mask_width + 7) / 8); } void @@ -129,7 +129,7 @@ OptionClasslessStaticRoute::calcDataLen() { // 1-5 octets of destination descriptor len += calcSignificantOctets(std::get<1>(route)) + 1; // IP address of the router - len += 4; + len += V4ADDRESS_LEN; } data_len_ = len; |