};
getPools(GET_POOL6_RANGE, in_bindings, pools, pool_ids);
- // Break if something is found?
- }
- if (!pools.empty()) {
- pool_id = pool_ids[0];
- return (boost::dynamic_pointer_cast<Pool6>(*pools.begin()));
+ // Return upon the first pool found.
+ if (!pools.empty()) {
+ pool_id = pool_ids[0];
+ return (boost::dynamic_pointer_cast<Pool6>(*pools.begin()));
+ }
}
pool_id = 0;
-
return (Pool6Ptr());
}
const Option6PDExcludePtr& xopt = pd_pool->getPrefixExcludeOption();
if (xopt) {
const IOAddress& prefix = pd_pool->getFirstAddress();
- const IOAddress& xprefix = xopt->getExcludedPrefix(prefix, plen);
+ const IOAddress& xprefix = xopt->getExcludedPrefix(prefix, pd_pool->getLength());
xprefix_txt = xprefix.toText();
xlen = xopt->getExcludedPrefixLength();
}
test_options_[4]->persistent_,
test_options_[4]->space_name_);
- pdpool2.reset(new Pool6(Lease::TYPE_PD,
- IOAddress("2001:db8:d::"), 48, 64));
+ // Create the prefix delegation pool with an excluded prefix.
+ pdpool2.reset(new Pool6(IOAddress("2001:db8:d::"), 48, 64,
+ IOAddress("2001:db8:d::2000"), 120));
+
subnet->addPool(pdpool2);
pdpool2->allowClientClass("work");