Commit 76a78c53 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3694] Changes as a result of the second code review.

parent 3e85e573
......@@ -508,19 +508,21 @@ TEST_F(DORATest, reservation) {
// Client A still holds this address.
// 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
// address which is in use by Client A. The server drops the client's
// DHCPDISCOVER message.
// 15. Client A renews the lease.
// 16. The server determines that the address that Client A is using is reserved
// address which is in use by Client A and offers an address different
// than reserved.
// 15. Client B requests the allocation of the offered address and the server
// 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.
// 17. 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
// message is dropped again.
// 18. 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
// 18. 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 is assigned the same
// address it has been using.
// 19. Client A uses 4-way exchange to allocate a new lease.
// 20. The server allocates a new lease from the dynamic pool but it avoids
// allocating the address reserved for the Client B.
// 20. Client B uses 4-way exchange to obtain a new lease.
// 21. The server finally allocates a reserved address to the Client B.
// 21. Client B uses 4-way exchange to obtain a new lease.
// 22. The server finally allocates a reserved address to the Client B.
TEST_F(DORATest, reservationsWithConflicts) {
Dhcp4Client client(Dhcp4Client::SELECTING);
// Configure DHCP server.
......
......@@ -123,6 +123,9 @@ TEST(IOAddressTest, isV4Zero) {
// 0.0.0.0
const IOAddress address_zero("0.0.0.0");
EXPECT_TRUE(address_zero.isV4Zero());
// :: (v6 zero address)
const IOAddress address_zero_v6("::");
EXPECT_FALSE(address_zero_v6.isV4Zero());
// 192.0.2.3
const IOAddress address_non_zero("192.0.2.3");
EXPECT_FALSE(address_non_zero.isV4Zero());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment