Commit 1e892105 authored by Shawn Routhier's avatar Shawn Routhier
Browse files

Merge branch 'master' into trac3687

This will pull the LFC code into the PID branch allowing
addition of the PID calls into LFC
parents 5ba6d265 cd291643
879. [bug] fdupont
Drop DHCPREQUEST message from an unknown client in the
INIT-REBOOT state.
(Trac #3656, git 8e205adc35d8e72d1802d5ee9056e6c4ac78274a)
878. [func] marcin
DHCPv4 and DHCPv6 server now support the lfc-interval
parameter which configures the interval in which the
......
......@@ -1393,6 +1393,8 @@ AC_CONFIG_FILES([compatcheck/Makefile
src/bin/keactrl/keactrl.conf
src/bin/keactrl/tests/Makefile
src/bin/keactrl/tests/keactrl_tests.sh
src/bin/lfc/Makefile
src/bin/lfc/tests/Makefile
src/bin/perfdhcp/Makefile
src/bin/perfdhcp/tests/Makefile
src/bin/perfdhcp/tests/testdata/Makefile
......
......@@ -650,6 +650,7 @@ INPUT = ../src/bin/d2 \
../src/bin/dhcp6 \
../src/bin/perfdhcp \
../src/bin/sockcreator \
../src/bin/lfc \
../src/hooks/dhcp/user_chk \
../src/lib/asiolink \
../src/lib/cc \
......
# The following build order must be maintained.
SUBDIRS = dhcp4 dhcp6 d2 perfdhcp admin
SUBDIRS = dhcp4 dhcp6 d2 perfdhcp admin lfc
if CONFIG_BACKEND_JSON
SUBDIRS += keactrl
......
......@@ -83,7 +83,7 @@ public:
///
/// @note It never throws.
///
/// @param command Text represenation of the command (e.g. "shutdown")
/// @param command Text representation of the command (e.g. "shutdown")
/// @param args Optional parameters
///
/// @return status of the command
......
......@@ -21,7 +21,7 @@ isc::dhcp::Dhcpv4Srv class. It uses \ref libdhcp extensively,
especially isc::dhcp::Pkt4, isc::dhcp::Option and
isc::dhcp::IfaceMgr classes. Currently this code offers skeleton
functionality, i.e. it is able to receive and process incoming
requests and trasmit responses. However, it does not have database
requests and transmit responses. However, it does not have database
management, so it returns only one, hardcoded lease to whoever asks
for it.
......@@ -174,7 +174,7 @@ be interpreted as a class name.
In principle any given packet can belong to zero or more classes. As the current
classifier is very modest, there's only one way to assign a class (based on vendor class
option), the ability to assign more than one class to a packet is not yet exercised.
Neverthless, there is such a possibility and it will be used in a near future. To
Nevertheless, there is such a possibility and it will be used in a near future. To
check whether a packet belongs to given class, isc::dhcp::Pkt4::inClass method should
be used.
......
......@@ -29,7 +29,7 @@ to establish a session with the Kea control channel.
% DHCP4_CLASS_ASSIGNED client packet has been assigned to the following class(es): %1
This debug message informs that incoming packet has been assigned to specified
class or classes. This is a norma
class or classes. This is a normal behavior and indicates successful operation.
% DHCP4_CLASS_PROCESSING_FAILED client class specific processing failed
This debug message means that the server processing that is unique for each
......@@ -80,7 +80,7 @@ updated configuration from the Kea configuration system.
% DHCP4_DDNS_REQUEST_SEND_FAILED failed sending a request to kea-dhcp-ddns, error: %1, ncr: %2
This error message indicates that DHCP4 server attempted to send a DDNS
update reqeust to the DHCP-DDNS server. This is most likely a configuration or
update request to the DHCP-DDNS server. This is most likely a configuration or
networking error.
% DHCP4_DEACTIVATE_INTERFACE deactivate interface %1
......@@ -93,7 +93,7 @@ This error message is logged when the attempt to compute DHCID for a specified
lease has failed. The lease details and reason for failure is logged in the
message.
% DHCP4_DYNAMIC_RECONFIGURATION initate server reconfiguration using file: %1, after receiving SIGHUP signal
% DHCP4_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: %1, after receiving SIGHUP signal
This is the info message logged when the DHCPv4 server starts reconfiguration
as a result of receiving SIGHUP signal.
......@@ -158,6 +158,10 @@ This debug message is issued when the client being in the INIT-REBOOT state
requested an address which is not assigned to him. The server will respond
to this client with DHCPNAK.
% DHCP4_NO_LEASE_INIT_REBOOT no lease for address %1 requested by INIT-REBOOT client (id: %2, hwaddr: %3)
This debug message is issued when the client being in the INIT-REBOOT state
requested an address but this client is unknown. The server will not respond.
% DHCP4_INVALID_RELAY_INFO malformed packet received from client-id %1, hwaddr %2: %3
This message is logged when the client sends invalid combination of
values in the giaddr and hops fields. If the packet is relayed it should
......@@ -167,7 +171,7 @@ combinations are invalid and trigger packet drop.
% DHCP4_LEASE_ADVERT lease %1 advertised (client client-id %2, hwaddr %3)
This debug message indicates that the server successfully advertised
a lease. It is up to the client to choose one server out of othe advertised
a lease. It is up to the client to choose one server out of other advertised
and continue allocation with that server. This is a normal behavior and
indicates successful operation.
......@@ -217,7 +221,7 @@ no interfaces that server should listen on, or specified interfaces are not
configured to receive the traffic.
% DHCP4_NO_SUBNET_FOR_DIRECT_CLIENT no suitable subnet configured for a direct client sending packet with transaction id %1, on interface %2, received message is dropped
This info messsage is logged when received a message from a directly connected
This info message is logged when received a message from a directly connected
client but there is no suitable subnet configured for the interface on
which this message has been received. The IPv4 address assigned on this
interface must belong to one of the configured subnets. Otherwise
......
......@@ -181,13 +181,13 @@ Dhcpv4Srv::run() {
// 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.
......@@ -200,7 +200,7 @@ Dhcpv4Srv::run() {
}
// Timeout may be reached or signal received, which breaks select()
// with no reception ocurred
// with no reception occurred
if (!query) {
continue;
}
......@@ -778,7 +778,7 @@ Dhcpv4Srv::processClientFqdnOption(const Option4ClientFqdnPtr& fqdn,
// 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);
......@@ -831,7 +831,7 @@ Dhcpv4Srv::processHostnameOption(const OptionStringPtr& opt_hostname,
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
......@@ -1002,10 +1002,20 @@ Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
// If there is no server id and there is a Requested IP Address option
// the client is in the INIT-REBOOT state in which the server has to
// determine whether the client's notion of the address has to be verified.
// determine whether the client's notion of the address is correct
// and whether the client is known, i.e., has a lease.
if (!fake_allocation && !opt_serverid && opt_requested_address) {
Lease4Ptr lease = LeaseMgrFactory::instance().getLease4(hint);
if (!lease) {
Lease4Ptr lease;
if (hwaddr) {
lease = LeaseMgrFactory::instance().getLease4(*hwaddr,
subnet->getID());
}
if (!lease && client_id) {
lease = LeaseMgrFactory::instance().getLease4(*client_id,
subnet->getID());
}
// Got a lease so we can check the address.
if (lease && (lease->addr_ != hint)) {
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL,
DHCP4_INVALID_ADDRESS_INIT_REBOOT)
.arg(hint.toText())
......@@ -1016,6 +1026,17 @@ Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
answer->setYiaddr(IOAddress("0.0.0.0"));
return;
}
// Now check the second error case: unknown client.
if (!lease) {
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL,
DHCP4_NO_LEASE_INIT_REBOOT)
.arg(hint.toText())
.arg(client_id ? client_id->toText():"(no client-id)")
.arg(hwaddr ? hwaddr->toText():"(no hwaddr info)");
answer.reset();
return;
}
}
......@@ -1199,7 +1220,7 @@ Dhcpv4Srv::adjustIfaceData(const Pkt4Ptr& query, const Pkt4Ptr& response) {
/// @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());
......@@ -1226,7 +1247,7 @@ Dhcpv4Srv::adjustRemoteAddr(const Pkt4Ptr& question, const Pkt4Ptr& response) {
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
......@@ -1240,7 +1261,7 @@ Dhcpv4Srv::adjustRemoteAddr(const Pkt4Ptr& question, const Pkt4Ptr& response) {
} else {
response->setRemoteAddr(question->getRemoteAddr());
}
// Remote addres is now set so return.
// Remote address is now set so return.
return;
}
......@@ -1329,6 +1350,11 @@ Dhcpv4Srv::processDiscover(Pkt4Ptr& discover) {
assignLease(discover, offer);
if (!offer) {
// The offer is empty so return it *now*!
return (offer);
}
// Adding any other options makes sense only when we got the lease.
if (offer->getYiaddr() != IOAddress("0.0.0.0")) {
appendRequestedOptions(discover, offer);
......@@ -1376,6 +1402,11 @@ Dhcpv4Srv::processRequest(Pkt4Ptr& request) {
// or even rebinding.
assignLease(request, ack);
if (!ack) {
// The ack is empty so return it *now*!
return (ack);
}
// Adding any other options makes sense only when we got the lease.
if (ack->getYiaddr() != IOAddress("0.0.0.0")) {
appendRequestedOptions(request, ack);
......@@ -1605,9 +1636,9 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& question) const {
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);
......@@ -1741,7 +1772,7 @@ Dhcpv4Srv::acceptServerId(const Pkt4Ptr& query) const {
// 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.
......@@ -1834,7 +1865,7 @@ Dhcpv4Srv::unpackOptions(const OptionBuffer& buf,
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()
......@@ -2027,8 +2058,8 @@ Dhcpv4Srv::d2ClientErrorHandler(const
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();
}
......
// Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -97,7 +97,7 @@ public:
///
/// Main server processing loop. Receives incoming packets, verifies
/// their correctness, generates appropriate answer (if needed) and
/// transmits respones.
/// transmits responses.
///
/// @return true, if being shut down gracefully, fail if experienced
/// critical error.
......@@ -205,7 +205,7 @@ protected:
bool accept(const Pkt4Ptr& query) const;
/// @brief Check if a message sent by directly connected client should be
/// accepted or discared.
/// accepted or discarded.
///
/// This function checks if the received message is from directly connected
/// client. If it is, it checks that it should be processed or discarded.
......@@ -236,9 +236,9 @@ protected:
/// @brief Check if received message type is valid for the server to
/// process.
///
/// This function checks that the received message type belongs to the range
/// of types regonized by the server and that the message of this type
/// should be processed by the server.
/// This function checks that the received message type belongs to
/// the range of types recognized by the server and that the
/// message of this type should be processed by the server.
///
/// The messages types accepted for processing are:
/// - Discover
......@@ -354,12 +354,18 @@ protected:
/// @brief Assigns a lease and appends corresponding options
///
/// This method chooses the most appropriate lease for reqesting
/// This method chooses the most appropriate lease for requesting
/// client and assigning it. Options corresponding to the lease
/// are added to specific message.
///
/// @param question DISCOVER or REQUEST message from client
/// @param answer OFFER or ACK/NAK message (lease options will be added here)
/// @param answer OFFER or ACK/NAK message (lease options will be
/// added here)
///
/// This method may reset the @c answer shared pointer to indicate
/// that the response should not be sent to the client. The caller
/// must check if the @c answer is null after calling this method.
void assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer);
/// @brief Append basic options if they are not present.
......@@ -410,7 +416,7 @@ protected:
/// This function does not throw. It simply logs the debug message if the
/// processing of the FQDN or Hostname failed.
///
/// @param query A DISCOVER or REQUEST message from a cient.
/// @param query A DISCOVER or REQUEST message from a client.
/// @param [out] answer A response message to be sent to a client.
void processClientName(const Pkt4Ptr& query, Pkt4Ptr& answer);
......@@ -438,7 +444,7 @@ private:
/// @brief Process Hostname %Option sent by a client.
///
/// This function is called by the @c DHcpv4Srv::processClientName when
/// This function is called by the @c Dhcpv4Srv::processClientName when
/// the client has sent the Hostname option in its message to the server.
/// It comprises the actual logic to parse the Hostname option and
/// prepare the Hostname option to be sent back to the client in the
......@@ -455,7 +461,7 @@ protected:
/// @brief Creates NameChangeRequests which correspond to the lease
/// which has been acquired.
///
/// If this function is called whe an existing lease is renewed, it
/// If this function is called when an existing lease is renewed, it
/// may generate NameChangeRequest to remove existing DNS entries which
/// correspond to the old lease instance. This function may cease to
/// generate NameChangeRequests if the notion of the client's FQDN hasn't
......@@ -506,7 +512,7 @@ protected:
/// @brief Adds server identifier option to the server's response.
///
/// This method adds a server identifier to the DHCPv4 message. It epxects
/// This method adds a server identifier to the DHCPv4 message. It expects
/// that the local (source) address is set for this message. If address is
/// not set, it will throw an exception. This method also expects that the
/// server identifier option is not present in the specified message.
......
......@@ -111,7 +111,7 @@ public:
/// @brief Constructor
///
/// @param ignored first parameter
/// stores global scope parameters, options, option defintions.
/// stores global scope parameters, options, option definitions.
Subnet4ConfigParser(const std::string&)
:SubnetConfigParser("", globalContext(), IOAddress("0.0.0.0")) {
}
......@@ -455,7 +455,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
// Answer will hold the result.
ConstElementPtr answer;
// Rollback informs whether error occured and original data
// Rollback informs whether error occurred and original data
// have to be restored to global storages.
bool rollback = false;
// config_pair holds the details of the current parser when iterating over
......@@ -520,7 +520,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
.arg(config_pair.first).arg(ex.what());
answer = isc::config::createAnswer(1, ex.what());
// An error occured, so make sure that we restore original data.
// An error occurred, so make sure that we restore original data.
rollback = true;
} catch (...) {
......@@ -529,7 +529,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
answer = isc::config::createAnswer(1, "undefined configuration"
" processing error");
// An error occured, so make sure that we restore original data.
// An error occurred, so make sure that we restore original data.
rollback = true;
}
......
......@@ -152,8 +152,9 @@ main(int argc, char* argv[]) {
log_manager.process();
LOG_ERROR(dhcp4_logger, DHCP4_INIT_FAIL).arg(ex.what());
} catch (...) {
// The exeption thrown during the initialization could originate
// from logger subsystem. Therefore LOG_ERROR() may fail as well.
// The exception thrown during the initialization could
// originate from logger subsystem. Therefore LOG_ERROR()
// may fail as well.
cerr << "Failed to initialize server: " << ex.what() << endl;
}
......
......@@ -19,7 +19,7 @@
namespace {
/// As of May 2014, maintaining or extending Bundy support is very low
/// prority for Kea team. We are looking for contributors, who would
/// priority for Kea team. We are looking for contributors, who would
/// like to maintain this backend.
// Bundy framework specific tests should be added here.
......
......@@ -295,7 +295,7 @@ public:
EXPECT_TRUE(errorContainsPosition(x, "<string>"));
}
/// @brief Test invalid option paramater value.
/// @brief Test invalid option parameter value.
///
/// This test function constructs the simple configuration
/// string and injects invalid option configuration into it.
......@@ -2067,7 +2067,7 @@ TEST_F(Dhcp4ParserTest, optionDataEncapsulate) {
EXPECT_TRUE(desc.option_);
EXPECT_EQ(222, desc.option_->getType());
// This opton should comprise two sub-options.
// This option should comprise two sub-options.
// One of them is 'foo' with code 1.
OptionPtr option_foo = desc.option_->getOption(1);
ASSERT_TRUE(option_foo);
......@@ -2510,7 +2510,7 @@ TEST_F(Dhcp4ParserTest, DISABLED_Uint32Parser) {
TEST_F(Dhcp4ParserTest, stdOptionDataEncapsulate) {
// The configuration is two stage process in this test.
// In the first stahe we create definitions of suboptions
// In the first stage we create definitions of suboptions
// that we will add to the base option.
// Let's create some dummy options: foo and foo2.
string config = "{ \"interfaces\": [ \"*\" ],"
......@@ -3346,7 +3346,7 @@ TEST_F(Dhcp4ParserTest, reservations) {
ASSERT_TRUE(hosts_cfg);
// Let's create an object holding hardware address of the host having
// a reservation in the subnet having id of 234. For simlicity the
// a reservation in the subnet having id of 234. For simplicity the
// address is a collection of numbers from 1 to 6.
std::vector<uint8_t> hwaddr_vec;
for (int i = 1; i < 7; ++i) {
......@@ -3396,7 +3396,7 @@ TEST_F(Dhcp4ParserTest, reservations) {
}
// This test verfies that the bogus host reservation would trigger a
// This test verifies that the bogus host reservation would trigger a
// server configuration error.
TEST_F(Dhcp4ParserTest, reservationBogus) {
// Case 1: misspelled hw-address parameter.
......
......@@ -292,7 +292,7 @@ TEST_F(Dhcp4SrvD2Test, simpleUDPSend) {
// Checks that an IO error in sending a request to D2, results in ddns updates
// being suspended. This indicates that Dhcp4Srv's error handler has been
// invoked as expected. Note that this unit test relies on an attempt to send
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSs
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSes
// except Solaris 11.
/// @todo Eventually we should find a way to test this under Solaris.
#ifndef OS_SOLARIS
......
......@@ -100,7 +100,7 @@ public:
/// @param exp_result indicates if configuration should pass or fail
void configure(const std::string& config, bool exp_result = SHOULD_PASS);
/// @brief Contructs a NameChangeRequest message from a fixed JSON string.
/// @brief Constructs a NameChangeRequest message from a fixed JSON string.
///
/// @param dhcid_id_num Integer value to use as the DHCID.
dhcp_ddns::NameChangeRequestPtr buildTestNcr(uint32_t
......@@ -109,7 +109,7 @@ public:
/// @brief Stores the return code of the last configuration attempt.
int rcode_;
/// @brief Stores the message component of the last configuration tattempt.
/// @brief Stores the message component of the last configuration attempt.
isc::data::ConstElementPtr comment_;
/// @brief Server object under test.
......
......@@ -270,7 +270,7 @@ HWAddrPtr
Dhcp4Client::generateHWAddr(const uint8_t htype) const {
if (htype != HTYPE_ETHER) {
isc_throw(isc::NotImplemented,
"The harware address type " << static_cast<int>(htype)
"The hardware address type " << static_cast<int>(htype)
<< " is currently not supported");
}
std::vector<uint8_t> hwaddr(HWAddr::ETHERNET_HWADDR_LEN);
......
......@@ -185,7 +185,7 @@ public:
/// - Requested IP Address option
/// - server identifier
/// are used (as per RFC2131, section 4.3.2). Therefore, the unit tests
/// must setthe appropriate state of the client prior to calling this
/// must set the appropriate state of the client prior to calling this
/// method using the @c setState function.
///
/// When the server returns the DHCPACK the configuration carried in the
......
......@@ -318,7 +318,7 @@ TEST_F(Dhcpv4SrvTest, adjustIfaceDataBroadcast) {
ASSERT_NO_THROW(NakedDhcpv4Srv::adjustIfaceData(req, resp));
// Server must repond to broadcast address when client desired that
// Server must respond to broadcast address when client desired that
// by setting the broadcast flag in its request.
EXPECT_EQ("255.255.255.255", resp->getRemoteAddr().toText());
......@@ -1172,7 +1172,7 @@ TEST_F(Dhcpv4SrvTest, relayAgentInfoEcho) {
// In particular, it should call registered buffer4_receive callback.
srv.run();
// Check that the server did send a reposonse
// Check that the server did send a response
ASSERT_EQ(1, srv.fake_sent_.size());
// Make sure that we received a response
......@@ -1248,7 +1248,7 @@ TEST_F(Dhcpv4SrvTest, vendorOptionsDocsis) {
// In particular, it should call registered buffer4_receive callback.
srv.run();
// Check that the server did send a reposonse
// Check that the server did send a response
ASSERT_EQ(1, srv.fake_sent_.size());
// Make sure that we received a response
......@@ -1772,7 +1772,7 @@ public:
// get rid of the old client-id (and no HWADDR)
vector<uint8_t> mac;
pkt->delOption(DHO_DHCP_CLIENT_IDENTIFIER);
pkt->setHWAddr(1, 0, mac); // HWtype 1, hwardware len = 0
pkt->setHWAddr(1, 0, mac); // HWtype 1, hardware len = 0
// carry on as usual
return pkt4_receive_callout(callout_handle);
......@@ -1878,7 +1878,7 @@ public:
Pkt4Ptr pkt;
callout_handle.getArgument("response4", pkt);
// modify buffer to set a diffferent payload
// modify buffer to set a different payload
pkt->getBuffer().clear();
pkt->getBuffer().writeData(dummyFile, sizeof(dummyFile));
......@@ -1917,7 +1917,7 @@ public:
static int
subnet4_select_different_subnet_callout(CalloutHandle& callout_handle) {
// Call the basic calllout to record all passed values
// Call the basic callout to record all passed values
subnet4_select_callout(callout_handle);
const Subnet4Collection* subnets;
......@@ -2078,7 +2078,7 @@ TEST_F(HooksDhcpv4SrvTest, buffer4ReceiveValueChange) {
// In particular, it should call registered buffer4_receive callback.
srv_->run();
// Check that the server did send a reposonse
// Check that the server did send a response
ASSERT_EQ(1, srv_->fake_sent_.size());
// Make sure that we received a response
......@@ -2183,7 +2183,7 @@ TEST_F(HooksDhcpv4SrvTest, valueChange_pkt4_receive) {
// In particular, it should call registered pkt4_receive callback.
srv_->run();
// check that the server did send a reposonce
// check that the server did send a response
ASSERT_EQ(1, srv_->fake_sent_.size());
// Make sure that we received a response
......@@ -2312,7 +2312,7 @@ TEST_F(HooksDhcpv4SrvTest, pkt4SendValueChange) {
// In particular, it should call registered pkt4_receive callback.
srv_->run();
// check that the server did send a reposonce
// check that the server did send a response
ASSERT_EQ(1, srv_->fake_sent_.size());
// Make sure that we received a response
......@@ -3049,7 +3049,7 @@ TEST_F(Dhcpv4SrvTest, vendorOptionsORO) {
offer = srv.processDiscover(dis);
ASSERT_TRUE(offer);
// Check if thre is vendor option response
// Check if there is a vendor option response
OptionPtr tmp = offer->getOption(DHO_VIVSO_SUBOPTIONS);
ASSERT_TRUE(tmp);
......@@ -3196,7 +3196,7 @@ TEST_F(Dhcpv4SrvTest, clientClassify2) {
// Still not supported, because it belongs to wrong class.
EXPECT_FALSE(srv_.selectSubnet(dis));
// Let's add it to maching class.
// Let's add it to matching class.
dis->addClass("foo");
// This time it should work
......@@ -3396,7 +3396,7 @@ TEST_F(Dhcpv4SrvTest, acceptDirectRequest) {