bool
addOrUpdate6(Lease6Ptr lease, bool force_create) {
- /// @todo throw if PD address is in declined state
- /*
- if (lease->stateDeclined() && lease->type_ == Lease::TYPE_PD) {
- isc_throw(isc::InvalidOperation,
- "invalid PD address in declined state");
- }
- */
Lease6Ptr existing =
LeaseMgrFactory::instance().getLease6(lease->type_, lease->addr_);
if (force_create && !existing) {
// Iterate over all leases.
for (auto lease : parsed_leases_list) {
- Lease6Parser parser;
-
try {
if (MultiThreadingMgr::instance().getMode() &&
!MultiThreadingMgr::instance().isInCriticalSection()) {
"values are: 0 (default), 1 (declined) and 2 (expired-reclaimed)");
}
+ /// @todo throw if PD address is in declined state
+ /*
+ if (state == Lease::STATE_DECLINED && type == Lease::TYPE_PD) {
+ isc_throw(isc::InvalidOperation,
+ "invalid PD address in declined state");
+ }
+ */
+
// Handle user context.
ConstElementPtr ctx = lease_info->get("user-context");
if (ctx && (ctx->getType() != Element::map)) {
/// it 6 times.
/// @param client_id_pattern value to be used for generating client identifier by
/// repeating it 8 times.
- /// @param declined controls weather the lease should be in declined state.
+ /// @param declined controls whether the lease should be in declined state.
///
/// @return Returns the lease created
Lease4Ptr createLease4(const std::string& ip_address,
/// @param subnet_id subnet identifier
/// @param duid_address_pattern value to be used for generating DUID by
/// repeating it 8 times
- /// @param declined controls weather the lease should be in declined state.
+ /// @param declined controls whether the lease should be in declined state.
///
/// @return Returns the lease created
Lease6Ptr createLease6(const std::string& ip_address,