]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Failover port configuration can now be left to defaults (port 647) as
authorDavid Hankins <dhankins@isc.org>
Fri, 20 Feb 2009 18:20:00 +0000 (18:20 +0000)
committerDavid Hankins <dhankins@isc.org>
Fri, 20 Feb 2009 18:20:00 +0000 (18:20 +0000)
  described in the -12 revision of the Failover draft (and assigned by
  IANA).  [ISC-Bugs #17738]

RELNOTES
includes/failover.h
server/confpars.c
server/dhcpd.conf.5

index 502f365dc61f65a44dace040ad975708306f4363..873e5eebf132fbe07dd59c37297eed959da0ecab 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -38,7 +38,9 @@ work on other platforms. Please report any problems and suggested fixes to
 
                        Changes since 4.1.0 (new features)
 
-
+- Failover port configuration can now be left to defaults (port 647) as
+  described in the -12 revision of the Failover draft (and assigned by
+  IANA).
 
                        Changes since 4.1.0 (bug fixes)
 
index 6bf0cc59068c60d4d6a01f2a3110c8015654f366..ed3dc961f354809371f2d5346632117940aa77dc 100644 (file)
@@ -74,6 +74,16 @@ typedef struct {
 # define DEFAULT_MAX_RESPONSE_DELAY    20
 #endif
 
+/*
+ * IANA has assigned ports 647 ("dhcp-failover") and 847 ("dhcp-failover2").
+ * Of these, only port 647 is mentioned in the -12 draft revision.  We're not
+ * sure if they are supposed to indicate primary and secondary?  No matter,
+ * we'll stick to the -12 draft revision level.
+ */
+#ifndef  DEFAULT_FAILOVER_PORT
+# define DEFAULT_FAILOVER_PORT         647
+#endif
+
 #define FM_OFFSET(x) (long)(&(((failover_message_t *)0) -> x))
 
 /* All of the below definitions are mandated by draft-ietf-dhc-failover-12.
index f8e82266ce22546a309e28c1c3c19e8deebee5e2..88ae3b527c2fab3eec706d87d5a3ffd4d614aa7d 100644 (file)
@@ -1131,11 +1131,10 @@ void parse_failover_peer (cfile, group, type)
        if (!peer -> partner.address)
                parse_warn (cfile, "peer address may not be omitted");
 
-       /* XXX - when/if we get a port number assigned, just set as default */
-       if (!peer -> me.port)
-               parse_warn (cfile, "local port may not be omitted");
-       if (!peer -> partner.port)
-               parse_warn (cfile, "peer port may not be omitted");
+       if (!peer->me.port)
+               peer->me.port = DEFAULT_FAILOVER_PORT;
+       if (!peer->partner.port)
+               peer->partner.port = DEFAULT_FAILOVER_PORT;
 
        if (peer -> i_am == primary) {
            if (!peer -> hba) {
index 78325850df1d111548867ed657defdbd458191de..8352ea713920c2c95b4acdefa9269e1d62bba2df 100644 (file)
@@ -28,7 +28,7 @@
 .\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
 .\" ``http://www.nominum.com''.
 .\"
-.\" $Id: dhcpd.conf.5,v 1.100 2009/01/22 21:22:42 dhankins Exp $
+.\" $Id: dhcpd.conf.5,v 1.101 2009/02/20 18:20:00 dhankins Exp $
 .\"
 .TH dhcpd.conf 5
 .SH NAME
@@ -594,9 +594,9 @@ statement
 .B port \fIport-number\fR\fB;\fR
 .PP
 The \fBport\fR statement declares the TCP port on which the server
-should listen for connections from its failover peer.   This statement
-may not currently be omitted, because the failover protocol does not
-yet have a reserved TCP port number.
+should listen for connections from its failover peer.  This statement
+may be omitted, in which case the IANA assigned port number 647 will be
+used by default.
 .RE
 .PP
 The 
@@ -608,10 +608,8 @@ statement
 .PP
 The \fBpeer port\fR statement declares the TCP port to which the
 server should connect to reach its failover peer for failover
-messages.   This statement may not be omitted because the failover
-protocol does not yet have a reserved TCP port number.   The port
-number declared in the \fBpeer port\fR statement may be the same as
-the port number declared in the \fBport\fR statement.
+messages.  This statement may be omitted, in which case the IANA
+assigned port number 647 will be used by default.
 .RE
 .PP
 The