Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
76a78c53
Commit
76a78c53
authored
Mar 06, 2015
by
Marcin Siodelski
Browse files
[3694] Changes as a result of the second code review.
parent
3e85e573
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/tests/dora_unittest.cc
View file @
76a78c53
...
@@ -508,19 +508,21 @@ TEST_F(DORATest, reservation) {
...
@@ -508,19 +508,21 @@ TEST_F(DORATest, reservation) {
// Client A still holds this address.
// Client A still holds this address.
// 13. Client B uses 4-way exchange to obtain a new lease.
// 13. Client B uses 4-way exchange to obtain a new lease.
// 14. The server determines that the Client B has a reservation for the
// 14. The server determines that the Client B has a reservation for the
// address which is in use by Client A. The server drops the client's
// address which is in use by Client A and offers an address different
// DHCPDISCOVER message.
// than reserved.
// 15. Client A renews the lease.
// 15. Client B requests the allocation of the offered address and the server
// 16. The server determines that the address that Client A is using is reserved
// allocates this address.
// 16. Client A renews the lease.
// 17. The server determines that the address that Client A is using is reserved
// for Client B. The server returns DHCPNAK to the Client A.
// for Client B. The server returns DHCPNAK to the Client A.
// 1
7
. Client B uses 4-way exchange to obtain the reserved lease but the lease
// 1
8
. Client B uses 4-way exchange to obtain the reserved lease but the lease
// for the Client A hasn't been removed yet. Client B
's DHCPDISCOVER
// for the Client A hasn't been removed yet. Client B
is assigned the same
//
message is dropped aga
in.
//
address it has been us
in
g
.
// 1
8
. Client A uses 4-way exchange to allocate a new lease.
// 1
9
. Client A uses 4-way exchange to allocate a new lease.
//
19
. The server allocates a new lease from the dynamic pool but it avoids
//
20
. The server allocates a new lease from the dynamic pool but it avoids
// allocating the address reserved for the Client B.
// allocating the address reserved for the Client B.
// 2
0
. Client B uses 4-way exchange to obtain a new lease.
// 2
1
. Client B uses 4-way exchange to obtain a new lease.
// 2
1
. The server finally allocates a reserved address to the Client B.
// 2
2
. The server finally allocates a reserved address to the Client B.
TEST_F
(
DORATest
,
reservationsWithConflicts
)
{
TEST_F
(
DORATest
,
reservationsWithConflicts
)
{
Dhcp4Client
client
(
Dhcp4Client
::
SELECTING
);
Dhcp4Client
client
(
Dhcp4Client
::
SELECTING
);
// Configure DHCP server.
// Configure DHCP server.
...
...
src/lib/asiolink/tests/io_address_unittest.cc
View file @
76a78c53
...
@@ -123,6 +123,9 @@ TEST(IOAddressTest, isV4Zero) {
...
@@ -123,6 +123,9 @@ TEST(IOAddressTest, isV4Zero) {
// 0.0.0.0
// 0.0.0.0
const
IOAddress
address_zero
(
"0.0.0.0"
);
const
IOAddress
address_zero
(
"0.0.0.0"
);
EXPECT_TRUE
(
address_zero
.
isV4Zero
());
EXPECT_TRUE
(
address_zero
.
isV4Zero
());
// :: (v6 zero address)
const
IOAddress
address_zero_v6
(
"::"
);
EXPECT_FALSE
(
address_zero_v6
.
isV4Zero
());
// 192.0.2.3
// 192.0.2.3
const
IOAddress
address_non_zero
(
"192.0.2.3"
);
const
IOAddress
address_non_zero
(
"192.0.2.3"
);
EXPECT_FALSE
(
address_non_zero
.
isV4Zero
());
EXPECT_FALSE
(
address_non_zero
.
isV4Zero
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment