if (lease_info->contains("subnet-id")) {
subnet_id = getUint32(lease_info, "subnet-id");
}
+
+ uint32_t pool_id = 0;
+ if (lease_info->contains("pool-id")) {
+ pool_id = getUint32(lease_info, "pool-id");
+ }
+
ConstSubnet4Ptr subnet;
if (subnet_id) {
// If subnet-id is specified, it has to match.
fqdn_fwd, fqdn_rev, hostname));
l->state_ = state;
l->setContext(ctx);
+ l->pool_id_ = pool_id;
// Sanitize extended info.
if (ctx) {
subnet_id = getUint32(lease_info, "subnet-id");
}
+ uint32_t pool_id = 0;
+ if (lease_info->contains("pool-id")) {
+ pool_id = getUint32(lease_info, "pool-id");
+ }
+
// Check if the subnet-id specified is sane.
ConstSubnet6Ptr subnet;
if (subnet_id) {
l->cltt_ = cltt;
l->state_ = state;
l->setContext(ctx);
+ l->pool_id_ = pool_id;
// Sanitize extended info.
if (ctx) {
const IdentifierBaseTypePtr&,
const IOAddress&) {
auto subnet = subnet_.lock();
- auto pools = subnet->getPools(pool_type_);
+ auto const& pools = subnet->getPools(pool_type_);
if (pools.empty()) {
// No pools, no allocation.
return (pool_type_ == Lease::TYPE_V4 ? IOAddress::IPV4_ZERO_ADDRESS() : IOAddress::IPV6_ZERO_ADDRESS());
const IOAddress&,
uint8_t hint_prefix_length) {
auto subnet = subnet_.lock();
- auto pools = subnet->getPools(pool_type_);
+ auto const& pools = subnet->getPools(pool_type_);
if (pools.empty()) {
// No pool, no allocation.
return (IOAddress::IPV6_ZERO_ADDRESS());
void
FreeLeaseQueueAllocator::initAfterConfigureInternal() {
auto subnet = subnet_.lock();
- auto pools = subnet->getPools(pool_type_);
+ auto const& pools = subnet->getPools(pool_type_);
if (pools.empty()) {
// If there are no pools there is nothing to do.
return;