summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r--src/lib/dhcp/libdhcp++.cc4
-rw-r--r--src/lib/dhcp/option_custom.cc3
-rw-r--r--src/lib/dhcp/tests/libdhcp++_unittest.cc2
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.