diff options
author | Thomas Markwalder <tmark@isc.org> | 2024-08-07 15:58:19 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2024-08-07 15:58:19 +0200 |
commit | ac266d9c990f1e3bfb951523807a43ea2c6460fb (patch) | |
tree | 0473ac9ec4b349332e2f420c0f029143d18e0537 /src/lib/dhcp | |
parent | [#3492] ChangeLog and cleanup (diff) | |
download | kea-ac266d9c990f1e3bfb951523807a43ea2c6460fb.tar.xz kea-ac266d9c990f1e3bfb951523807a43ea2c6460fb.zip |
[#3492] Addressed review comments
Fixed ChangeLog, UT, and minor cleanups
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r-- | src/lib/dhcp/libdhcp++.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcp/option_custom.cc | 3 | ||||
-rw-r--r-- | src/lib/dhcp/tests/libdhcp++_unittest.cc | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc index 1c40b9cee1..867b6baefa 100644 --- a/src/lib/dhcp/libdhcp++.cc +++ b/src/lib/dhcp/libdhcp++.cc @@ -445,8 +445,8 @@ LibDHCP::unpackOptions6(const OptionBuffer& buf, const string& option_space, } catch (const SkipRemainingOptionsError&) { throw; } catch (const std::exception& ex) { - isc_throw(OptionParseError, "opt_type: " << (uint16_t)(opt_type) - << ", opt_len " << (uint16_t)(opt_len) + isc_throw(OptionParseError, "opt_type: " << static_cast<uint16_t>(opt_type) + << ", opt_len " << static_cast<uint16_t>(opt_len) << " error: " << ex.what()); } } diff --git a/src/lib/dhcp/option_custom.cc b/src/lib/dhcp/option_custom.cc index e7018dd790..202f802720 100644 --- a/src/lib/dhcp/option_custom.cc +++ b/src/lib/dhcp/option_custom.cc @@ -236,7 +236,8 @@ OptionCustom::bufferLength(const OptionDataType data_type, bool in_array, } catch (const std::exception& ex) { if (Option::lenient_parsing_) { isc_throw(SkipThisOptionError, "failed to read " - "partial domain-name from wire format"); + "domain-name from wire format: " + << ex.what()); } throw; diff --git a/src/lib/dhcp/tests/libdhcp++_unittest.cc b/src/lib/dhcp/tests/libdhcp++_unittest.cc index d6a7af8594..3985b711b1 100644 --- a/src/lib/dhcp/tests/libdhcp++_unittest.cc +++ b/src/lib/dhcp/tests/libdhcp++_unittest.cc @@ -3659,7 +3659,7 @@ TEST_F(LibDhcpTest, unpackOptions4LenientFqdn) { DHO_DOMAIN_SEARCH, // invalid FQDN list 2, 2, 56, DHO_TIME_OFFSET, // Valid int option - 4,0,0,0,77 + 4, 0, 0, 0, 77 }; // List of parsed options will be stored here. |