]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5390] Minor tweaks to comments and docs.
authorTomek Mrugalski <tomasz@isc.org>
Mon, 19 Feb 2018 16:06:31 +0000 (17:06 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 19 Feb 2018 16:06:31 +0000 (17:06 +0100)
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/lib/dhcpsrv/tests/cfg_iface_unittest.cc

index 66a39e6cb2ed131568072e5e5adf42687b63019e..37be8932e6363940209596697605fc2dc64e7f42 100644 (file)
@@ -773,7 +773,7 @@ temporarily override a list of interface names and listen on all interfaces.
   </para>
 
   <para>Usually loopback interfaces (e.g. the "lo" or "lo0" interface)
-  may not configured but if a loopback interface is explicitely configured
+  may not be configured but if a loopback interface is explicitely configured
   and IP/UDP sockets are specified the loopback interface is accepted.
   </para>
 
index c26b7ab205f391e88e3537f774a451f5e8546e35..acb58b0c4fa4025fb36ab7bd03c65c238f329e79 100644 (file)
@@ -654,9 +654,9 @@ temporarily override a list of interface names and listen on all interfaces.
 }
   </screen>
 
-  <para>Usually loopback interfaces (e.g. the "lo" or "lo0" interface)
-  may not configured but if a loopback interface is explicitely configured
-  it is accepted. Note Kea requires a link-local address which does
+  <para>The loopback interfaces (i.e. the "lo" or "lo0" interface)
+  are not configured by default, unles explicitely mentioned in
+  the configration. Note Kea requires a link-local address which does
   not exist on all systems, or a specified unicast address as in:
   </para>
 
index 25c36056b29a4197fcd8466b44b276b1d651c44c..d4927176c0277ca7af02cb64cc79856f0741424a 100644 (file)
@@ -209,12 +209,12 @@ TEST_F(CfgIfaceTest, explicitLoopbackV4) {
     ASSERT_NO_THROW(cfg.use(AF_INET, "lo"));
     ASSERT_NO_THROW(cfg.useSocketType(AF_INET, CfgIface::SOCKET_UDP));
     cfg.openSockets(AF_INET, DHCP4_SERVER_PORT);
-    // No wildcard is no longer a constraint
+    // It is now allowed to use loopback, even with wildcard.
     EXPECT_TRUE(socketOpen("lo", "127.0.0.1"));
     cfg.closeSockets();
     ASSERT_FALSE(socketOpen("lo", "127.0.0.1"));
 
-    // Retry without UDP sockets
+    // Retry without UDP sockets (lo can be only used with udp sockets)
     cfg.reset();
     ASSERT_NO_THROW(cfg.use(AF_INET, "lo"));
     cfg.openSockets(AF_INET, DHCP4_SERVER_PORT);
@@ -227,7 +227,8 @@ TEST_F(CfgIfaceTest, explicitLoopbackV4) {
     ASSERT_NO_THROW(cfg.use(AF_INET, "lo"));
     ASSERT_NO_THROW(cfg.useSocketType(AF_INET, CfgIface::SOCKET_UDP));
     cfg.openSockets(AF_INET, DHCP4_SERVER_PORT);
-    // Only loopback is no longer a constraint
+    // The logic used to require lo to be the only interface. That constraint
+    // was removed.
     EXPECT_TRUE(socketOpen("lo", "127.0.0.1"));
     cfg.closeSockets();
     EXPECT_FALSE(socketOpen("lo", "127.0.0.1"));
@@ -381,7 +382,8 @@ TEST_F(CfgIfaceTest, explicitLoopbackV6) {
     ASSERT_NO_THROW(cfg.use(AF_INET6, "*"));
     ASSERT_NO_THROW(cfg.use(AF_INET6, "lo/::1"));
     cfg.openSockets(AF_INET6, DHCP6_SERVER_PORT);
-    // No wildcard is no longer a constraint
+    // The logic used to require lo to be used only on its own, not with a
+    // wildcard. That constraint was removed.
     EXPECT_TRUE(socketOpen("lo", AF_INET6));
     cfg.closeSockets();
     ASSERT_FALSE(socketOpen("lo", AF_INET6));
@@ -391,7 +393,8 @@ TEST_F(CfgIfaceTest, explicitLoopbackV6) {
     ASSERT_NO_THROW(cfg.use(AF_INET6, "eth0"));
     ASSERT_NO_THROW(cfg.use(AF_INET6, "lo/::1"));
     cfg.openSockets(AF_INET6, DHCP6_SERVER_PORT);
-    // Only loopback is no longer a constraint
+    // The logic used to require lo to be used only on its own, not with a
+    // wildcard. That constraint was removed.
     EXPECT_TRUE(socketOpen("lo", AF_INET6));
     cfg.closeSockets();
     ASSERT_FALSE(socketOpen("lo", AF_INET6));
@@ -401,7 +404,8 @@ TEST_F(CfgIfaceTest, explicitLoopbackV6) {
     ASSERT_NO_THROW(cfg.use(AF_INET6, "eth0/2001:db8:1::1"));
     ASSERT_NO_THROW(cfg.use(AF_INET6, "lo/::1"));
     cfg.openSockets(AF_INET6, DHCP6_SERVER_PORT);
-    // Only loopback is no longer a constraint
+    // The logic used to require lo to be used only on its own, not with a
+    // wildcard. That constraint was removed.
     EXPECT_TRUE(socketOpen("lo", AF_INET6));
     cfg.closeSockets();
     ASSERT_FALSE(socketOpen("lo", AF_INET6));