BIND 10 trac2320, updated. c1fd5c76dc679f0156748f66f58f3d7220703332 [2320] Documentation updated.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jan 3 12:33:40 UTC 2013
The branch, trac2320 has been updated
via c1fd5c76dc679f0156748f66f58f3d7220703332 (commit)
via 234e86994e8af3f68d830ec22e9857aa34c78983 (commit)
from 1deefe2736bcc2b61e07f20ea732d178d84ab772 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c1fd5c76dc679f0156748f66f58f3d7220703332
Author: Tomek Mrugalski <tomasz at isc.org>
Date: Thu Jan 3 13:33:23 2013 +0100
[2320] Documentation updated.
commit 234e86994e8af3f68d830ec22e9857aa34c78983
Author: Tomek Mrugalski <tomasz at isc.org>
Date: Thu Jan 3 13:33:06 2013 +0100
[2320] Tests updated
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 ++
doc/guide/bind10-guide.xml | 47 +++----
src/bin/dhcp4/dhcp4_messages.mes | 8 +-
src/bin/dhcp4/dhcp4_srv.cc | 4 +-
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 199 +++++++++++++++++++++++------
src/bin/dhcp4/tests/dhcp4_unittests.cc | 11 +-
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc | 2 +-
7 files changed, 199 insertions(+), 81 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 4c268ae..465e107 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+5XX. [func] tomek
+ b10-dhcp4: Allocation engine support for IPv4 added. Currently
+ supported operations are server selection (Discover/Offer),
+ address assignment (Request/Ack), address renewal (Request/Ack),
+ and address release (Release). Expired leases can be reused.
+ Some options (e.g. Router Option) are still hardcoded, so the
+ DHCPv4 server is not yet usable, although its address allocation
+ is operational.
+
bind10-1.0.0-beta released on December 20, 2012
533. [build]* jreed
diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml
index 81ef868..e2bd4d0 100644
--- a/doc/guide/bind10-guide.xml
+++ b/doc/guide/bind10-guide.xml
@@ -3343,23 +3343,21 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
<note>
<para>
- As of November 2012, the DHCPv4 component is a
- skeleton server. That means that while it is capable of
- performing DHCP configuration, it is not fully functional.
- In particular, it does not have a functional lease
- database. This means that they will assign the same, fixed,
- hardcoded addresses to any client that will ask. See <xref
- linkend="dhcp4-limit"/> for a
- detailed description.
+ As of January 2013, the DHCPv4 component is a work in progress.
+ That means that while it is capable of performing DHCP configuration,
+ it is not fully functional. The server is able to offer,
+ assign, renew, release and reuse expired leases, but some of the
+ options are not configurable yet. In particular Router option is hardcoded.
+ This means that the server is not really usable in actual deployments
+ yet. See <xref linkend="dhcp4-limit"/> for a detailed description.
</para>
</note>
<section id="dhcp4-usage">
<title>DHCPv4 Server Usage</title>
<para>BIND 10 has provided the DHCPv4 server component since December
- 2011. It is a skeleton server and can be described as an early
- prototype that is not fully functional yet. It is mature enough
- to conduct first tests in lab environment, but it has
+ 2011. It is current experimental implementation and is not fully functional
+ yet. It is mature enough to conduct tests in lab environment, but it has
significant limitations. See <xref linkend="dhcp4-limit"/> for
details.
</para>
@@ -3480,9 +3478,10 @@ Dhcp4/subnet4 [] list (default)</screen>
</para>
<para>
- Note: Although configuration is now accepted, it is not internally used
- by they server yet. At this stage of development, the only way to alter
- server configuration is to modify its source code. To do so, please edit
+ Note: Although configuration is now accepted, some parts of it is not internally used
+ by they server yet. Address pools are used, but option definitons are not.
+ The only way to alter some options (e.g. Router Option or DNS servers and Domain name)
+ is to modify source code. To do so, please edit
src/bin/dhcp6/dhcp4_srv.cc file, modify the following parameters and
recompile:
<screen>
@@ -3533,20 +3532,6 @@ const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
communication).</simpara>
</listitem>
<listitem>
- <simpara><command>b10-dhcp4</command> provides a single,
- fixed, hardcoded lease to any client that asks. There is
- no lease manager implemented. If two clients request
- addresses, they will both get the same fixed
- address.</simpara>
- </listitem>
- <listitem>
- <simpara><command>b10-dhcp4</command> does not support any
- configuration mechanisms yet. The whole configuration is
- currently hardcoded. The only way to tweak configuration
- is to directly modify source code. See see <xref
- linkend="dhcp4-config"/> for details.</simpara>
- </listitem>
- <listitem>
<simpara>Upon start, the server will open sockets on all
interfaces that are not loopback, are up and running and
have IPv4 address.</simpara>
@@ -3574,9 +3559,9 @@ const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
sending ICMP echo request.</simpara>
</listitem>
<listitem>
- <simpara>Address renewal (RENEW), rebinding (REBIND),
- confirmation (CONFIRM), duplication report (DECLINE) and
- release (RELEASE) are not supported yet.</simpara>
+ <simpara>Address rebinding (REQUEST/Rebinding), confirmation
+ (CONFIRM) and duplication report (DECLINE) are not supported
+ yet.</simpara>
</listitem>
<listitem>
<simpara>DNS Update is not supported yet.</simpara>
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index 5510af0..068ba95 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -60,23 +60,23 @@ This informational message is printed every time DHCPv4 server is started.
It indicates what database backend type is being to store lease and
other information.
-% DHCP4_LEASE_ADVERT lease %1 advertised (client client-id=%2, iaid=%3)
+% 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
and continue allocation with that server. This is a normal behavior and
indicates successful operation.
-% DHCP4_LEASE_ADVERT_FAIL failed to advertise a lease for client client-id=%1, iaid=%2
+% DHCP4_LEASE_ADVERT_FAIL failed to advertise a lease for client client-id=%1, hwaddr=%2
This message indicates that the server failed to offer (in response to
received DISCOVER) a lease for a given client. There may be many reasons for
such failure. Each specific failure is logged in a separate log entry.
-% DHCP4_LEASE_ALLOC lease %1 has been allocated (client duid=%2, iaid=%3)
+% DHCP4_LEASE_ALLOC lease %1 has been allocated for client-id=%2, hwaddr=%3
This debug message indicates that the server successfully granted (in
response to client's REQUEST message) a lease. This is a normal behavior
and incicates successful operation.
-% DHCP4_LEASE_ALLOC_FAIL failed to grant a lease for client duid=%1, iaid=%2
+% DHCP4_LEASE_ALLOC_FAIL failed to grant a lease for client-id=%1, hwaddr=%2
This message indicates that the server failed to grant (in response to
received REQUEST) a lease for a given client. There may be many reasons for
such failure. Each specific failure is logged in a separate log entry.
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index a5babc0..7a5d11e 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -310,9 +310,9 @@ void Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
// with IAADDR suboption.
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL, fake_allocation?
DHCP4_LEASE_ADVERT:DHCP4_LEASE_ALLOC)
+ .arg(lease->addr_.toText())
.arg(client_id?client_id->toText():"(no client-id)")
- .arg(hwaddr?hwaddr->toText():"(no hwaddr info)")
- .arg(hint.toText());
+ .arg(hwaddr?hwaddr->toText():"(no hwaddr info)");
answer->setYiaddr(lease->addr_);
diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
index 2a28309..810cbdc 100644
--- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
+++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2013 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
@@ -19,6 +19,7 @@
#include <dhcp/dhcp4.h>
#include <dhcp/option.h>
#include <dhcp4/dhcp4_srv.h>
+#include <dhcp4/dhcp4_log.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/lease_mgr.h>
#include <dhcpsrv/lease_mgr_factory.h>
@@ -36,7 +37,6 @@ using namespace isc::dhcp;
using namespace isc::asiolink;
namespace {
-const char* const INTERFACE_FILE = "interfaces.txt";
class NakedDhcpv4Srv: public Dhcpv4Srv {
// "naked" DHCPv4 server, exposes internal fields
@@ -88,7 +88,11 @@ public:
EXPECT_TRUE(a->getYiaddr().toText() != "0.0.0.0");
}
- // Generate client-id option
+ // Generate client-id option of specified length
+ // Ids with different lengths are sufficent to generate
+ // unique ids. If more fine grained control is required,
+ // tests generate client-ids on their own.
+ // Sets client_id_ field.
OptionPtr generateClientId(size_t size = 4) {
OptionBuffer clnt_id(size);
@@ -103,6 +107,15 @@ public:
clnt_id.begin() + size)));
}
+ HWAddrPtr generateHWAddr(size_t size = 6) {
+ const uint8_t hw_type = 123; // just a fake number (typically 6=HTYPE_ETHER, see dhcp4.h)
+ OptionBuffer mac(size);
+ for (int i = 0; i < size; ++i) {
+ mac[i] = 50 + i;
+ }
+ return (HWAddrPtr(new HWAddr(mac, hw_type)));
+ }
+
// Check that address was returned from proper range, that its lease
// lifetime is correct, that T1 and T2 are returned properly
void checkAddressParams(const Pkt4Ptr& rsp, const SubnetPtr subnet,
@@ -210,6 +223,8 @@ public:
ClientIdPtr client_id_;
};
+// Sanity check. Verifies that both Dhcpv4Srv and its derived
+// class NakedDhcpv4Srv can be instantiated and destroyed.
TEST_F(Dhcpv4SrvTest, basic) {
// nothing to test. DHCPv4_srv instance is created
// in test fixture. It is destroyed in destructor
@@ -231,12 +246,17 @@ TEST_F(Dhcpv4SrvTest, basic) {
});
EXPECT_TRUE(naked_srv->getServerID());
- delete srv;
-
-
-
+ delete naked_srv;
}
+// Verifies that received DISCOVER can be processed correctly,
+// that the OFFER message generated in response is valid and
+// contains necessary options.
+//
+// Note: this test focuses on the packet correctness. There
+// are other tests that verify correctness of the allocation
+// engine. See DiscoverBasic, DiscoverHint, DiscoverNoClientId
+// and DiscoverInvalidHint.
TEST_F(Dhcpv4SrvTest, processDiscover) {
NakedDhcpv4Srv* srv = new NakedDhcpv4Srv(0);
vector<uint8_t> mac(6);
@@ -253,26 +273,26 @@ TEST_F(Dhcpv4SrvTest, processDiscover) {
pkt->setRemoteAddr(IOAddress("192.0.2.56"));
pkt->setGiaddr(IOAddress("192.0.2.67"));
- // let's make it a relayed message
+ // Let's make it a relayed message
pkt->setHops(3);
pkt->setRemotePort(DHCP4_SERVER_PORT);
- // should not throw
+ // Should not throw
EXPECT_NO_THROW(
offer = srv->processDiscover(pkt);
);
- // should return something
+ // Should return something
ASSERT_TRUE(offer);
EXPECT_EQ(DHCPOFFER, offer->getType());
- // this is relayed message. It should be sent back to relay address.
+ // This is relayed message. It should be sent back to relay address.
EXPECT_EQ(pkt->getGiaddr(), offer->getRemoteAddr());
MessageCheck(pkt, offer);
- // now repeat the test for directly sent message
+ // Now repeat the test for directly sent message
pkt->setHops(0);
pkt->setGiaddr(IOAddress("0.0.0.0"));
pkt->setRemotePort(DHCP4_CLIENT_PORT);
@@ -281,12 +301,12 @@ TEST_F(Dhcpv4SrvTest, processDiscover) {
offer = srv->processDiscover(pkt);
);
- // should return something
+ // Should return something
ASSERT_TRUE(offer);
EXPECT_EQ(DHCPOFFER, offer->getType());
- // this is direct message. It should be sent back to origin, not
+ // This is direct message. It should be sent back to origin, not
// to relay.
EXPECT_EQ(pkt->getRemoteAddr(), offer->getRemoteAddr());
@@ -295,6 +315,13 @@ TEST_F(Dhcpv4SrvTest, processDiscover) {
delete srv;
}
+// Verifies that received REQUEST can be processed correctly,
+// that the ACK message generated in response is valid and
+// contains necessary options.
+//
+// Note: this test focuses on the packet correctness. There
+// are other tests that verify correctness of the allocation
+// engine. See RequestBasic.
TEST_F(Dhcpv4SrvTest, processRequest) {
NakedDhcpv4Srv* srv = new NakedDhcpv4Srv(0);
vector<uint8_t> mac(6);
@@ -588,11 +615,11 @@ TEST_F(Dhcpv4SrvTest, DiscoverInvalidHint) {
/// being used by a different client.
// This test checks that the server is offering different addresses to different
-// clients in ADVERTISEs. Please note that ADVERTISE is not a guarantee that such
-// and address will be assigned. Had the pool was very small and contained only
+// clients in OFFERs. Please note that OFFER is not a guarantee that such
+// an address will be assigned. Had the pool was very small and contained only
// 2 addresses, the third client would get the same advertise as the first one
// and this is a correct behavior. It is REQUEST that will fail for the third
-// client. ADVERTISE is basically saying "if you send me a request, you will
+// client. OFFER is basically saying "if you send me a request, you will
// probably get an address like this" (there are no guarantees).
TEST_F(Dhcpv4SrvTest, ManyDiscovers) {
boost::scoped_ptr<NakedDhcpv4Srv> srv;
@@ -651,17 +678,21 @@ TEST_F(Dhcpv4SrvTest, ManyDiscovers) {
cout << "Offered address to client3=" << addr3.toText() << endl;
}
-// This test verifies that incoming DISCOVER can be handled properly, that an
-// OFFER is generated, that the response has an address and that address
+// This test verifies that incoming REQUEST can be handled properly, that an
+// ACK is generated, that the response has an address and that address
// really belongs to the configured pool.
//
-// constructed very simple DISCOVER message with:
+// constructed a single REQUEST message with:
// - client-id option
+// - hwaddr information
+// - requested address (that the client received in DISCOVER/OFFER exchange)
//
-// expected returned OFFER message:
+// expected returned ACK message:
// - copy of client-id
// - server-id
-// - offered address
+// - assigned address
+//
+// Test verifies that the lease is actually in the database.
TEST_F(Dhcpv4SrvTest, RequestBasic) {
boost::scoped_ptr<NakedDhcpv4Srv> srv;
ASSERT_NO_THROW( srv.reset(new NakedDhcpv4Srv(0)) );
@@ -695,7 +726,102 @@ TEST_F(Dhcpv4SrvTest, RequestBasic) {
LeaseMgrFactory::instance().deleteLease(l->addr_);
}
-// This test verifies that incoming (positive) RENEW can be handled properly, that a
+// This test verifies that incoming REQUEST can be handled properly, that an
+// ACK is generated, that the response has an address and that address
+// really belongs to the configured pool.
+//
+// constructed 3 REQUEST messages with:
+// - client-id option (differs between messages)
+// - hwaddr information (differs between messages)
+//
+// expected returned ACK message:
+// - copy of client-id
+// - server-id
+// - assigned address (different for each client)
+TEST_F(Dhcpv4SrvTest, ManyRequests) {
+
+ boost::scoped_ptr<NakedDhcpv4Srv> srv;
+ ASSERT_NO_THROW( srv.reset(new NakedDhcpv4Srv(0)) );
+
+ const IOAddress req_addr1("192.0.2.105");
+ const IOAddress req_addr2("192.0.2.101");
+ const IOAddress req_addr3("192.0.2.109");
+ const IOAddress relay("192.0.2.1");
+
+ Pkt4Ptr req1 = Pkt4Ptr(new Pkt4(DHCPOFFER, 1234));
+ Pkt4Ptr req2 = Pkt4Ptr(new Pkt4(DHCPOFFER, 2345));
+ Pkt4Ptr req3 = Pkt4Ptr(new Pkt4(DHCPOFFER, 3456));
+
+ req1->setRemoteAddr(relay);
+ req2->setRemoteAddr(relay);
+ req3->setRemoteAddr(relay);
+
+ req1->setYiaddr(req_addr1);
+ req2->setYiaddr(req_addr2);
+ req3->setYiaddr(req_addr3);
+
+ req1->setHWAddr(generateHWAddr(6));
+ req2->setHWAddr(generateHWAddr(7));
+ req3->setHWAddr(generateHWAddr(8));
+
+ // different client-id sizes
+ OptionPtr clientid1 = generateClientId(4); // length 4
+ OptionPtr clientid2 = generateClientId(5); // length 5
+ OptionPtr clientid3 = generateClientId(6); // length 6
+
+ req1->addOption(clientid1);
+ req2->addOption(clientid2);
+ req3->addOption(clientid3);
+
+ // Pass it to the server and get an advertise
+ Pkt4Ptr ack1 = srv->processRequest(req1);
+ Pkt4Ptr ack2 = srv->processRequest(req2);
+ Pkt4Ptr ack3 = srv->processRequest(req3);
+
+ // check if we get response at all
+ checkResponse(ack1, DHCPACK, 1234);
+ checkResponse(ack2, DHCPACK, 2345);
+ checkResponse(ack3, DHCPACK, 3456);
+
+ IOAddress addr1 = ack1->getYiaddr();
+ IOAddress addr2 = ack2->getYiaddr();
+ IOAddress addr3 = ack3->getYiaddr();
+
+ // Check that every client received the address it requested
+ EXPECT_EQ(req_addr1.toText(), addr1.toText());
+ EXPECT_EQ(req_addr2.toText(), addr2.toText());
+ EXPECT_EQ(req_addr3.toText(), addr3.toText());
+
+ // Check that the assigned address is indeed from the configured pool
+ checkAddressParams(ack1, subnet_);
+ checkAddressParams(ack2, subnet_);
+ checkAddressParams(ack3, subnet_);
+
+ // check DUIDs
+ checkServerId(ack1, srv->getServerID());
+ checkServerId(ack2, srv->getServerID());
+ checkServerId(ack3, srv->getServerID());
+ checkClientId(ack1, clientid1);
+ checkClientId(ack2, clientid2);
+ checkClientId(ack3, clientid3);
+
+ // Check that leases are in the database
+ Lease4Ptr l = checkLease(ack1, clientid1, req1->getHWAddr(), addr1);
+ EXPECT_TRUE(l);
+ l = checkLease(ack2, clientid2, req2->getHWAddr(), addr2);
+ l = checkLease(ack3, clientid3, req3->getHWAddr(), addr3);
+
+ // Finally check that the addresses offered are different
+ EXPECT_NE(addr1.toText(), addr2.toText());
+ EXPECT_NE(addr2.toText(), addr3.toText());
+ EXPECT_NE(addr3.toText(), addr1.toText());
+ cout << "Offered address to client1=" << addr1.toText() << endl;
+ cout << "Offered address to client2=" << addr2.toText() << endl;
+ cout << "Offered address to client3=" << addr3.toText() << endl;
+}
+
+
+// This test verifies that incoming (positive) REQUEST/Renewing can be handled properly, that a
// REPLY is generated, that the response has an address and that address
// really belongs to the configured pool and that lease is actually renewed.
//
@@ -744,6 +870,7 @@ TEST_F(Dhcpv4SrvTest, RenewBasic) {
Pkt4Ptr req = Pkt4Ptr(new Pkt4(DHCPREQUEST, 1234));
req->setRemoteAddr(IOAddress(addr));
req->setYiaddr(addr);
+ req->setCiaddr(addr); // client's address
req->addOption(clientid);
req->addOption(srv->getServerID());
@@ -809,16 +936,9 @@ TEST_F(Dhcpv4SrvTest, sanityCheck) {
RFCViolation);
}
-// @todo: write tests for RELEASE
-// This test verifies that incoming (positive) RELEASE can be handled properly,
-// that a REPLY is generated, that the response has status code and that the
-// lease is indeed removed from the database.
-//
-// expected:
-// - returned REPLY message has copy of client-id
-// - returned REPLY message has server-id
-// - returned REPLY message has IA that does not include an IAADDR
-// - lease is actually removed from LeaseMgr
+// This test verifies that incoming (positive) RELEASE can be handled properly.
+// As there is no REPLY in DHCPv4, the only thing to verify here is that
+// the lease is indeed removed from the database.
TEST_F(Dhcpv4SrvTest, ReleaseBasic) {
boost::scoped_ptr<NakedDhcpv4Srv> srv;
ASSERT_NO_THROW( srv.reset(new NakedDhcpv4Srv(0)) );
@@ -892,12 +1012,6 @@ TEST_F(Dhcpv4SrvTest, ReleaseBasic) {
// 1. there is no such lease at all
// 2. there is such a lease, but it is assigned to a different IAID
// 3. there is such a lease, but it belongs to a different client
-//
-// expected:
-// - returned REPLY message has copy of client-id
-// - returned REPLY message has server-id
-// - returned REPLY message has IA that includes STATUS-CODE
-// - No lease in LeaseMgr
TEST_F(Dhcpv4SrvTest, ReleaseReject) {
boost::scoped_ptr<NakedDhcpv4Srv> srv;
ASSERT_NO_THROW( srv.reset(new NakedDhcpv4Srv(0)) );
@@ -936,7 +1050,7 @@ TEST_F(Dhcpv4SrvTest, ReleaseReject) {
// parity with similar test in DHCPv6.
EXPECT_NO_THROW(srv->processRelease(rel));
- // CASE 2: Lease is known and belongs to this client, but to a different client-id
+ // CASE 2: Lease is known and belongs to this client, but to a different hardware
SCOPED_TRACE("CASE 2: Lease is known and belongs to this client, but uses different HW addr");
// Let's create a lease and put it in the LeaseMgr
@@ -973,15 +1087,16 @@ TEST_F(Dhcpv4SrvTest, ReleaseReject) {
l = LeaseMgrFactory::instance().getLease4(addr);
ASSERT_TRUE(l);
- // Final sanity check. Verify that with valid hw and client-id release is working
+ // Final sanity check. Verify that with valid hw and client-id release is successful
rel->delOption(DHO_DHCP_CLIENT_IDENTIFIER);
rel->addOption(clientid);
+ // It should work this time
EXPECT_NO_THROW(srv->processRelease(rel));
+ // Check that the lease is not there
l = LeaseMgrFactory::instance().getLease4(addr);
EXPECT_FALSE(l);
-
}
} // end of anonymous namespace
diff --git a/src/bin/dhcp4/tests/dhcp4_unittests.cc b/src/bin/dhcp4/tests/dhcp4_unittests.cc
index 0ed61b7..2cd915b 100644
--- a/src/bin/dhcp4/tests/dhcp4_unittests.cc
+++ b/src/bin/dhcp4/tests/dhcp4_unittests.cc
@@ -13,15 +13,24 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <log/logger_support.h>
-
+#include <dhcp4/dhcp4_log.h>
#include <gtest/gtest.h>
int
main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv);
+
isc::log::initLogger();
+ // Uncomment those to get much more verbose tests
+ /*
+ isc::log::initLogger("b10-dhcp4",
+ isc::log::DEBUG,
+ isc::log::MAX_DEBUG_LEVEL, NULL, false);
+ isc::dhcp::dhcp4_logger.setSeverity(isc::log::DEBUG, 99);
+ */
+
int result = RUN_ALL_TESTS();
return (result);
diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
index 87cf0b4..1ceecc9 100644
--- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
+++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
@@ -582,7 +582,7 @@ TEST_F(Dhcpv6SrvTest, SolicitInvalidHint) {
// This test checks that the server is offering different addresses to different
// clients in ADVERTISEs. Please note that ADVERTISE is not a guarantee that such
-// and address will be assigned. Had the pool was very small and contained only
+// an address will be assigned. Had the pool was very small and contained only
// 2 addresses, the third client would get the same advertise as the first one
// and this is a correct behavior. It is REQUEST that will fail for the third
// client. ADVERTISE is basically saying "if you send me a request, you will
More information about the bind10-changes
mailing list