auto tags = server_selector.getTags();
auto not_in_tags = false;
for (auto subnet : subnets_) {
- // Get the pool: if it is not here we can directly go to the next subnet.
+ // Get the pool: if it is not here we can directly go to the next subnet.
auto pool = subnet->getPool(Lease::TYPE_V4, pool_start_address);
if (!pool) {
continue;
}
- // Verify the subnet is in all or one of the given servers.
+ // Verify the subnet is in all or one of the given servers.
if (!subnet->hasAllServerTag()) {
- auto in_tags = false;
+ auto in_tags = false;
for (auto tag : tags) {
if (subnet->hasServerTag(ServerTag(tag))) {
- in_tags = true;
+ in_tags = true;
break;
}
}
if (!in_tags) {
- // Records the fact a subnet was found but not in a server.
- not_in_tags = true;
+ // Records the fact a subnet was found but not in a server.
+ not_in_tags = true;
continue;
}
}
- // Update the option.
+ // Update the option.
pool->getCfgOption()->del(option->space_name_, option->option_->getType());
pool->getCfgOption()->add(*option, option->space_name_);
auto tags = server_selector.getTags();
auto not_in_tags = false;
for (auto subnet : subnets_) {
- // Get the pool: if it is not here we can directly go to the next subnet.
+ // Get the pool: if it is not here we can directly go to the next subnet.
auto pool = subnet->getPool(Lease::TYPE_NA, pool_start_address);
if (!pool) {
continue;
}
- // Verify the subnet is in all or one of the given servers.
+ // Verify the subnet is in all or one of the given servers.
if (!subnet->hasAllServerTag()) {
- auto in_tags = false;
+ auto in_tags = false;
for (auto tag : tags) {
if (subnet->hasServerTag(ServerTag(tag))) {
- in_tags = true;
+ in_tags = true;
break;
}
}
if (!in_tags) {
- // Records the fact a subnet was found but not in a server.
- not_in_tags = true;
+ // Records the fact a subnet was found but not in a server.
+ not_in_tags = true;
continue;
}
}
- // Update the option.
+ // Update the option.
pool->getCfgOption()->del(option->space_name_, option->option_->getType());
pool->getCfgOption()->add(*option, option->space_name_);
auto tags = server_selector.getTags();
auto not_in_tags = false;
for (auto subnet : subnets_) {
- // Get the pd pool: if it is not here we can directly go to the next subnet.
+ // Get the pd pool: if it is not here we can directly go to the next subnet.
auto pdpool = subnet->getPool(Lease::TYPE_PD, pd_pool_prefix);
if (!pdpool) {
continue;
}
- // Verify the subnet is in all or one of the given servers.
+ // Verify the subnet is in all or one of the given servers.
if (!subnet->hasAllServerTag()) {
- auto in_tags = false;
+ auto in_tags = false;
for (auto tag : tags) {
if (subnet->hasServerTag(ServerTag(tag))) {
in_tags = true;
}
}
if (!in_tags) {
- // Records the fact a subnet was found but not in a server.
- not_in_tags = true;
+ // Records the fact a subnet was found but not in a server.
+ not_in_tags = true;
continue;
}
}
- // Update the option.
+ // Update the option.
pdpool->getCfgOption()->del(option->space_name_, option->option_->getType());
pdpool->getCfgOption()->add(*option, option->space_name_);