Skip to content

Commit ac266d9

Browse files
committed
[#3492] Addressed review comments
Fixed ChangeLog, UT, and minor cleanups
1 parent f9341ca commit ac266d9

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

ChangeLog

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
2269. [func] tmark
22
Extended kea-dhcp4 and kea-dhcp6 lenient option parsing
3-
to drop options which contain malformed FQDNs such as
4-
DHO_V4_LOST_SERVER and D6O_V6_ACCESS_DOMAIN.
3+
to drop FQDN options such as v4-lost and v6-access-domain
4+
if they contain malformed FQDNs.
55
(Gitlab #3492)
66

77
Kea 2.7.1 (development) released on July 31, 2024
88

9-
2268. [build] ravan
9+
2268. [build] razvan
1010
The library version numbers have been bumped up for the Kea 2.7.1
1111
development release.
1212
(Gitlab #3515)

src/bin/dhcp4/tests/dhcp4_srv_unittest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6808,7 +6808,7 @@ TEST_F(StashAgentOptionTest, badRelayAgentInfo) {
68086808
sub_options_ = Element::create(content);
68096809
relay_agent_info_->set("sub-options", sub_options_);
68106810

6811-
EXPECT_THROW(srv_.recoverStashedAgentOption(query_), InvalidOptionValue);
6811+
EXPECT_THROW(srv_.recoverStashedAgentOption(query_), OptionParseError);
68126812
EXPECT_FALSE(query_->inClass("STASH_AGENT_OPTIONS"));
68136813
}
68146814

src/lib/dhcp/libdhcp++.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ LibDHCP::unpackOptions6(const OptionBuffer& buf, const string& option_space,
445445
} catch (const SkipRemainingOptionsError&) {
446446
throw;
447447
} catch (const std::exception& ex) {
448-
isc_throw(OptionParseError, "opt_type: " << (uint16_t)(opt_type)
449-
<< ", opt_len " << (uint16_t)(opt_len)
448+
isc_throw(OptionParseError, "opt_type: " << static_cast<uint16_t>(opt_type)
449+
<< ", opt_len " << static_cast<uint16_t>(opt_len)
450450
<< " error: " << ex.what());
451451
}
452452
}

src/lib/dhcp/option_custom.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ OptionCustom::bufferLength(const OptionDataType data_type, bool in_array,
236236
} catch (const std::exception& ex) {
237237
if (Option::lenient_parsing_) {
238238
isc_throw(SkipThisOptionError, "failed to read "
239-
"partial domain-name from wire format");
239+
"domain-name from wire format: "
240+
<< ex.what());
240241
}
241242

242243
throw;

src/lib/dhcp/tests/libdhcp++_unittest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3659,7 +3659,7 @@ TEST_F(LibDhcpTest, unpackOptions4LenientFqdn) {
36593659
DHO_DOMAIN_SEARCH, // invalid FQDN list
36603660
2, 2, 56,
36613661
DHO_TIME_OFFSET, // Valid int option
3662-
4,0,0,0,77
3662+
4, 0, 0, 0, 77
36633663
};
36643664

36653665
// List of parsed options will be stored here.

0 commit comments

Comments
 (0)