diff options
author | Francis Dupont <fdupont@isc.org> | 2023-01-28 09:35:45 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2023-02-08 16:52:03 +0100 |
commit | 28bf1c1b3ad4a7968eb004e9aabaedebc4819927 (patch) | |
tree | 92efacdb4a9908cb6dfab16303b154b83189e098 /src/lib/dhcpsrv/lease.cc | |
parent | [#2738] Checkpoint: create methods and factor UTs, todo alloc engine and v4 UTs (diff) | |
download | kea-28bf1c1b3ad4a7968eb004e9aabaedebc4819927.tar.xz kea-28bf1c1b3ad4a7968eb004e9aabaedebc4819927.zip |
[#2738] Checkpoint: UTs to do
Diffstat (limited to 'src/lib/dhcpsrv/lease.cc')
-rw-r--r-- | src/lib/dhcpsrv/lease.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/dhcpsrv/lease.cc b/src/lib/dhcpsrv/lease.cc index b11e45422f..061f823ba1 100644 --- a/src/lib/dhcpsrv/lease.cc +++ b/src/lib/dhcpsrv/lease.cc @@ -44,8 +44,7 @@ Lease::Lease(const isc::asiolink::IOAddress& addr, reuseable_valid_lft_(0), cltt_(cltt), current_cltt_(cltt), subnet_id_(subnet_id), hostname_(boost::algorithm::to_lower_copy(hostname)), fqdn_fwd_(fqdn_fwd), - fqdn_rev_(fqdn_rev), hwaddr_(hwaddr), state_(STATE_DEFAULT), - extended_info_action_(ExtendedInfoAction::ACTION_IGNORE) { + fqdn_rev_(fqdn_rev), hwaddr_(hwaddr), state_(STATE_DEFAULT) { } @@ -493,7 +492,8 @@ Lease6::Lease6(Lease::Type type, const isc::asiolink::IOAddress& addr, SubnetID subnet_id, const HWAddrPtr& hwaddr, uint8_t prefixlen) : Lease(addr, valid, subnet_id, 0/*cltt*/, false, false, "", hwaddr), type_(type), prefixlen_(prefixlen), iaid_(iaid), duid_(duid), - preferred_lft_(preferred), reuseable_preferred_lft_(0) { + preferred_lft_(preferred), reuseable_preferred_lft_(0), + extended_info_action_(ExtendedInfoAction::ACTION_IGNORE) { if (!duid) { isc_throw(InvalidOperation, "DUID is mandatory for an IPv6 lease"); } @@ -510,7 +510,9 @@ Lease6::Lease6(Lease::Type type, const isc::asiolink::IOAddress& addr, : Lease(addr, valid, subnet_id, 0/*cltt*/, fqdn_fwd, fqdn_rev, hostname, hwaddr), type_(type), prefixlen_(prefixlen), iaid_(iaid), duid_(duid), - preferred_lft_(preferred), reuseable_preferred_lft_(0) { + preferred_lft_(preferred), reuseable_preferred_lft_(0), + extended_info_action_(ExtendedInfoAction::ACTION_IGNORE) { + if (!duid) { isc_throw(InvalidOperation, "DUID is mandatory for an IPv6 lease"); } @@ -522,7 +524,8 @@ Lease6::Lease6(Lease::Type type, const isc::asiolink::IOAddress& addr, Lease6::Lease6() : Lease(isc::asiolink::IOAddress("::"), 0, 0, 0, false, false, "", HWAddrPtr()), type_(TYPE_NA), prefixlen_(0), iaid_(0), - duid_(DuidPtr()), preferred_lft_(0), reuseable_preferred_lft_(0) { + duid_(DuidPtr()), preferred_lft_(0), reuseable_preferred_lft_(0), + extended_info_action_(ExtendedInfoAction::ACTION_IGNORE) { } std::string |