2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#2011] Addressed first comments

This commit is contained in:
Francis Dupont
2021-08-09 15:42:48 +02:00
parent 5126b3d30b
commit 9f08e61005
3 changed files with 21 additions and 22 deletions

View File

@@ -71,12 +71,11 @@ to the end of this list.
- name: @b current_server, type: isc::d2::DnsServerInfoPtr, direction: <b>in</b>
- name: @b tsig_key, type: isc::dns::TSIGKeyPtr, direction: <b>in/out</b>
- @b Description: this callout is executed when the DNS server to send the
next DNS update was selected and a TSIG key to protect the DNS update
is looking for. Pointers to the selected DNS server and the current TSIG
key are provided. If a hook library wants to use another TSIG key the
pointer must be updated.
- @b Description: this callout is executed when the D2 is selecting for
a TSIG key to protect the next DNS update to the already chosen DNS
server. Pointers to the current DNS server and TSIG key are provided.
If a hook library wants to use another TSIG key the pointer must be updated.
- <b>Next step status</b>: IF any callout sets the status to value different
from CONTINUE the selected server is skipped.
- <b>Next step status</b>: If any callout sets the status to a different
value than CONTINUE the current server is skipped.
*/

View File

@@ -464,21 +464,21 @@ NameChangeTransaction::selectNextServer() {
for (;;) {
if ((current_server_list_) &&
(next_server_pos_ < current_server_list_->size())) {
current_server_ = (*current_server_list_)[next_server_pos_];
current_server_ = (*current_server_list_)[next_server_pos_];
// Toss out any previous response.
dns_update_response_.reset();
// Set the tsig_key to that of the current server..
// Set the tsig_key to that of the current server.
if (!selectTSIGKey()) {
++next_server_pos_;
continue;
}
// @todo Protocol is set on DNSClient constructor. We need
// @todo Protocol is set on DNSClient constructor. We need
// to propagate a configuration value downward, probably starting
// at global, then domain, then server
// at global, then domain, finishing by server.
// Once that is supported we need to add it here.
dns_client_.reset(new DNSClient(dns_update_response_ , this,
dns_client_.reset(new DNSClient(dns_update_response_, this,
DNSClient::UDP));
++next_server_pos_;
return (true);
@@ -507,7 +507,7 @@ NameChangeTransaction::selectTSIGKey() {
HooksManager::callCallouts(Hooks.hooks_index_select_key_,
*callout_handle);
// This server is skipped not NEXT_STEP_CONTINUE status.
// This server is skipped because of status is not NEXT_STEP_CONTINUE.
if (callout_handle->getStatus() != CalloutHandle::NEXT_STEP_CONTINUE) {
return (false);
}

View File

@@ -451,21 +451,21 @@ public:
/// @brief Getter which returns the server's hostname.
///
/// @return returns the hostname as as std::string.
/// @return the hostname as as std::string.
const std::string getHostname() const {
return (hostname_);
}
/// @brief Getter which returns the server's port number.
///
/// @return returns the port number as a unsigned integer.
/// @return the port number as a unsigned integer.
uint32_t getPort() const {
return (port_);
}
/// @brief Getter which returns the server's ip_address.
///
/// @return returns the address as an IOAddress reference.
/// @return the address as an IOAddress reference.
const isc::asiolink::IOAddress& getIpAddress() const {
return (ip_address_);
}
@@ -473,7 +473,7 @@ public:
/// @brief Convenience method which returns whether or not the
/// server is enabled.
///
/// @return returns true if the server is enabled, false otherwise.
/// @return true if the server is enabled, false otherwise.
bool isEnabled() const {
return (enabled_);
}
@@ -490,13 +490,13 @@ public:
/// @brief Convenience method which returns the server's TSIG key name.
///
/// @return returns the key name in an std::string. If server has no
/// TSIG key, the string will empty.
/// @return the key name in an std::string. If server has no TSIG key,
/// the string will be empty.
const std::string getKeyName() const;
/// @brief Getter which returns the server's TSIGKey info
/// @brief Getter which returns the server's TSIGKey info.
///
/// @return returns the pointer to the server storage. If the server
/// @return the pointer to the server storage. If the server
/// is not configured to use TSIG the pointer will be empty.
const TSIGKeyInfoPtr& getTSIGKeyInfo() {
return (tsig_key_info_);
@@ -581,7 +581,7 @@ public:
/// @note: TSIG key infos are in servers.
///
/// @return returns the key name in an std::string. If domain has no
/// TSIG key, the string will empty.
/// TSIG key, the string will be empty.
const std::string getKeyName() const {
return (key_name_);
}