]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2858] Add the commentary in the test
authorMarcin Siodelski <marcin@isc.org>
Wed, 24 May 2023 06:03:28 +0000 (08:03 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 24 May 2023 06:37:22 +0000 (08:37 +0200)
src/bin/dhcp4/tests/dora_unittest.cc

index 4d7e41c292a3dc6d7f8c1acae917fe1a3a83d7ce..bedf20d9bdf0bf45b4cee7481b8ef2307db65e34 100644 (file)
@@ -1454,12 +1454,20 @@ DORATest::notAuthoritativeSubnetSelectionFail() {
     client.includeClientId("11:22");
     client.useRelay(true, IOAddress("10.0.0.1"), IOAddress("10.0.0.2"));
 
+    // Current configuration contains a matching subnet from which
+    // the client should get a lease.
     client.doDORA();
 
+    // Let's now reconfigure the server to remove the subnet. The
+    // global authoritative flag is true.
     configure(DORA_CONFIGS[19], *client.getServer());
 
+    // Simulate that the client is in the INIT-REBOOT state. The
+    // client will request the previously assigned address and
+    // remove the server-id.
     client.setState(Dhcp4Client::INIT_REBOOT);
     ASSERT_NO_THROW_LOG(client.doRequest());
+
     // We are not authoritative so the server does not respond
     // at all.
     EXPECT_FALSE(client.getContext().response_);