diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 2 | ||||
-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 |
5 files changed, 9 insertions, 8 deletions
@@ -1,12 +1,12 @@ 2269. [func] tmark Extended kea-dhcp4 and kea-dhcp6 lenient option parsing - to drop options which contain malformed FQDNs such as - DHO_V4_LOST_SERVER and D6O_V6_ACCESS_DOMAIN. + to drop FQDN options such as v4-lost and v6-access-domain + if they contain malformed FQDNs. (Gitlab #3492) Kea 2.7.1 (development) released on July 31, 2024 -2268. [build] ravan +2268. [build] razvan The library version numbers have been bumped up for the Kea 2.7.1 development release. (Gitlab #3515) diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc index 67364ea377..06dfeffe82 100644 --- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc @@ -6808,7 +6808,7 @@ TEST_F(StashAgentOptionTest, badRelayAgentInfo) { sub_options_ = Element::create(content); relay_agent_info_->set("sub-options", sub_options_); - EXPECT_THROW(srv_.recoverStashedAgentOption(query_), InvalidOptionValue); + EXPECT_THROW(srv_.recoverStashedAgentOption(query_), OptionParseError); EXPECT_FALSE(query_->inClass("STASH_AGENT_OPTIONS")); } 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. |