The kea-dhcp4, kea-dhcp6 and kea-dhcp-ddns servers now support
multiple http/https connections. The can be configured in the
"control-sockets" list.
- (Gitlab #3082)
+ (Gitlab #3082, #3721)
2315. [func] razvan
Kea can now load hook libraries specifying only the binary name.
.arg(server_port);
}
}
+ // If the connection can be reused, mark it as usable.
it->second->usable_ = true;
} else {
auto copy = sockets_;
for (auto const& data : copy) {
if (data.second->usable_) {
+ // If the connection can be used (just created) or reused, keep it
+ // in the list and clear the flag. It will be marked again on next
+ // configuration event if needed.
data.second->usable_ = false;
} else {
+ // If the connection can not be reused, stop it and remove it from the list.
data.second->listener_->stop();
auto it = sockets_.find(std::make_pair(data.second->config_->getHttpHost(),
data.second->config_->getHttpPort()));
auto copy = sockets_;
for (auto const& data : copy) {
if (data.second->usable_) {
+ // If the connection can be used (just created) or reused, keep it
+ // in the list and clear the flag. It will be marked again on next
+ // configuration event if needed.
data.second->usable_ = false;
} else {
+ // If the connection can not be reused, stop it and remove it from the list.
closeCommandSocket(data.second, true);
}
}
it->second->config_->setAuthConfig(cmd_config->getAuthConfig());
it->second->config_->setEmulateAgentResponse(cmd_config->getEmulateAgentResponse());
}
+ // If the connection can be reused, mark it as usable.
it->second->usable_ = true;
return;
}
auto copy = sockets_;
for (auto const& data : copy) {
if (data.second->usable_) {
+ // If the connection can be used (just created) or reused, keep it
+ // in the list and clear the flag. It will be marked again on next
+ // configuration event if needed.
data.second->usable_ = false;
} else {
+ // If the connection can not be reused, stop it and remove it from the list.
closeCommandSocket(data.second);
}
}
// Search for the specific connection and reuse the existing one if found.
auto it = sockets_.find(cmd_config->getSocketName());
if (it != sockets_.end()) {
+ // If the connection can be reused, mark it as usable.
it->second->usable_ = true;
return;
}