From: Marcin Siodelski Date: Fri, 6 Mar 2015 08:59:22 +0000 (+0100) Subject: [3694] Changes as a result of the second code review. X-Git-Tag: trac3713_base~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76a78c5376a6a2a8ea4ce1421f719afc037e01df;p=thirdparty%2Fkea.git [3694] Changes as a result of the second code review. --- diff --git a/src/bin/dhcp4/tests/dora_unittest.cc b/src/bin/dhcp4/tests/dora_unittest.cc index e70635d4af..2e98c2d672 100644 --- a/src/bin/dhcp4/tests/dora_unittest.cc +++ b/src/bin/dhcp4/tests/dora_unittest.cc @@ -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. diff --git a/src/lib/asiolink/tests/io_address_unittest.cc b/src/lib/asiolink/tests/io_address_unittest.cc index 504d01d719..162b671893 100644 --- a/src/lib/asiolink/tests/io_address_unittest.cc +++ b/src/lib/asiolink/tests/io_address_unittest.cc @@ -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());