]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Fix startup error messages to report a missing "subnet6 declaration", rather
authorMark Andrews <marka@isc.org>
Wed, 13 Feb 2008 06:41:05 +0000 (06:41 +0000)
committerMark Andrews <marka@isc.org>
Wed, 13 Feb 2008 06:41:05 +0000 (06:41 +0000)
  than a missing "subnet declaration", when running as a DHCPv6 server.

RELNOTES
common/discover.c

index 78145ca5cc605782d9846d2824f1c4777b0f1cac..390ac2efb3fc6f203ddc231189cb977bfd4f86b6 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -153,6 +153,9 @@ work on other platforms. Please report any problems and suggested fixes to
 - The failover server no longer issues a floating point error if it encounters
   a previously undefined option code.
 
+- Fix startup error messages to report a missing "subnet6 declaration", rather
+  than a missing "subnet declaration", when running as a DHCPv6 server.
+
                        Changes since 4.0.0b3
 
 - The reverse dns name for PTR updates on IPv6 addresses has been fixed to
index e04897aed87a4a7a77fd9274df6e7ed4f61ccd99..d853cc3bac65a6f08b3389487dd79f6323705a3c 100644 (file)
@@ -1141,7 +1141,7 @@ discover_interfaces(int state) {
                                } else {
                                        strcpy(abuf, "no IPv6 addresses");
                                }
-                               log_error("No subnet declaration for %s (%s).",
+                               log_error("No subnet6 declaration for %s (%s).",
                                          tmp->name,
                                          abuf);
 #endif /* DHCPv6 */
@@ -1150,6 +1150,10 @@ discover_interfaces(int state) {
                                log_error ("** Ignoring requests on %s.  %s",
                                           tmp -> name, "If this is not what");
                                log_error ("   you want, please write %s",
+#ifdef DHCPv6
+                                          (local_family != AF_INET) ?
+                                          "a subnet6 declaration" :
+#endif
                                           "a subnet declaration");
                                log_error ("   in your dhcpd.conf file %s",
                                           "for the network segment");
@@ -1159,8 +1163,12 @@ discover_interfaces(int state) {
                                log_error ("%s", "");
                                goto next;
                        } else {
-                               log_error ("You must write a subnet %s",
-                                          " declaration for this");
+                               log_error ("You must write a %s",
+#ifdef DHCPv6
+                                          (local_family != AF_INET) ?
+                                          "subnet6 declaration for this" :
+#endif
+                                          "subnet declaration for this");
                                log_error ("subnet.   You cannot prevent %s",
                                           "the DHCP server");
                                log_error ("from listening on this subnet %s",