Commit e76cb2d7 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5390] Minor tweaks to comments and docs.

parent 8af68d76
......@@ -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>
......
......@@ -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>
......
......@@ -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));
......
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