// Handle next signal received by the process. It must be called after
// an attempt to receive a packet to properly handle server shut down.
// The SIGTERM or SIGINT will be received prior to, or during execution
- // of select() (select is invoked by recivePacket()). When that happens,
- // select will be interrupted. The signal handler will be invoked
- // immediately after select(). The handler will set the shutdown flag
- // and cause the process to terminate before the next select() function
- // is called. If the function was called before receivePacket the
- // process could wait up to the duration of timeout of select() to
- // terminate.
+ // of select() (select is invoked by receivePacket()). When that
+ // happens, select will be interrupted. The signal handler will be
+ // invoked immediately after select(). The handler will set the
+ // shutdown flag and cause the process to terminate before the next
+ // select() function is called. If the function was called before
+ // receivePacket the process could wait up to the duration of timeout
+ // of select() to terminate.
handleSignal();
// Execute ready timers for the lease database, e.g. Lease File Cleanup.
}
// Timeout may be reached or signal received, which breaks select()
- // with no reception ocurred
+ // with no reception occurred
if (!query) {
continue;
}
// lease for a client will scan the response message for FQDN and if it
// is found they will take necessary actions to store the FQDN information
// in the lease database as well as to generate NameChangeRequests to DNS.
- // If we don't store the option in the reponse message, we will have to
+ // If we don't store the option in the response message, we will have to
// propagate it in the different way to the functions which acquire the
// lease. This would require modifications to the API of this class.
answer->addOption(fqdn_resp);
opt_hostname_resp->setValue(".");
} else if (label_count == 2) {
// If there are two labels, it means that the client has specified
- // the unqualified name. We have to concatenate the unqalified name
+ // the unqualified name. We have to concatenate the unqualified name
// with the domain name. The false value passed as a second argument
// indicates that the trailing dot should not be appended to the
// hostname. We don't want to append the trailing dot because
/// @todo Consider an optimization that we use local address from
/// the query if this address is not broadcast.
SocketInfo sock_info = IfaceMgr::instance().getSocket(*query);
- // Set local adddress, port and interface.
+ // Set local address, port and interface.
response->setLocalAddr(sock_info.addr_);
response->setLocalPort(DHCP4_SERVER_PORT);
response->setIface(query->getIface());
if (question->getCiaddr() != zero_addr) {
response->setRemoteAddr(question->getCiaddr());
- // If we received DHCPINFOM via relay and the ciaddr is not set we
+ // If we received DHCPINFORM via relay and the ciaddr is not set we
// will try to send the response via relay. The caveat is that the
// relay will not have any idea where to forward the packet because
// the yiaddr is likely not set. So, the broadcast flag is set so
} else {
response->setRemoteAddr(question->getRemoteAddr());
}
- // Remote addres is now set so return.
+ // Remote address is now set so return.
return;
}
HooksManager::callCallouts(hook_index_subnet4_select_,
*callout_handle);
- // Callouts decided to skip this step. This means that no subnet will be
- // selected. Packet processing will continue, but it will be severly
- // limited (i.e. only global options will be assigned)
+ // Callouts decided to skip this step. This means that no subnet
+ // will be selected. Packet processing will continue, but it will
+ // be severely limited (i.e. only global options will be assigned)
if (callout_handle->getSkip()) {
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_HOOKS,
DHCP4_HOOK_SUBNET4_SELECT_SKIP);
// it here.
// Check if server identifier option is present. If it is not present
- // we accept the message because it is targetted to all servers.
+ // we accept the message because it is targeted to all servers.
// Note that we don't check cases that server identifier is mandatory
// but not present. This is meant to be sanity checked in other
// functions.
OptionDefContainer option_defs;
if (option_space == "dhcp4") {
- // Get the list of stdandard option definitions.
+ // Get the list of standard option definitions.
option_defs = LibDHCP::getOptionDefs(Option::V4);
} else if (!option_space.empty()) {
OptionDefContainerPtr option_defs_ptr = CfgMgr::instance()
dhcp_ddns::NameChangeRequestPtr& ncr) {
LOG_ERROR(dhcp4_logger, DHCP4_DDNS_REQUEST_SEND_FAILED).
arg(result).arg((ncr ? ncr->toText() : " NULL "));
- // We cannot communicate with kea-dhcp-ddns, suspend futher updates.
- /// @todo We may wish to revisit this, but for now we will simpy turn
+ // We cannot communicate with kea-dhcp-ddns, suspend further updates.
+ /// @todo We may wish to revisit this, but for now we will simply turn
/// them off.
CfgMgr::instance().getD2ClientMgr().suspendUpdates();
}