From 0 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 16 Oct 2007 00:08:03 +0000 Subject: [PATCH 08] Apply dhcp-3.0.3-rh-failover-ports.patch diff --git a/dhcp/includes/failover.h b/dhcp/includes/failover.h index defaced..defaced 100644 --- a/dhcp/includes/failover.h +++ b/dhcp/includes/failover.h @@ -73,10 +73,14 @@ typedef struct { * 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. + * ALT: We prefer using 647 for local and 847 for peer failover */ #ifndef DEFAULT_FAILOVER_PORT # define DEFAULT_FAILOVER_PORT 647 #endif +#ifndef DEFAULT_FAILOVER_PORT2 +# define DEFAULT_FAILOVER_PORT2 847 +#endif #define FM_OFFSET(x) (long)(&(((failover_message_t *)0) -> x)) diff --git a/dhcp/server/confpars.c b/dhcp/server/confpars.c index defaced..defaced 100644 --- a/dhcp/server/confpars.c +++ b/dhcp/server/confpars.c @@ -1166,7 +1166,7 @@ void parse_failover_peer (cfile, group, type) if (!peer->me.port) peer->me.port = DEFAULT_FAILOVER_PORT; if (!peer->partner.port) - peer->partner.port = DEFAULT_FAILOVER_PORT; + peer->partner.port = DEFAULT_FAILOVER_PORT2; if (peer -> i_am == primary) { if (!peer -> hba) { diff --git a/dhcp/server/dhcpd.conf.5 b/dhcp/server/dhcpd.conf.5 index defaced..defaced 100644 --- a/dhcp/server/dhcpd.conf.5 +++ b/dhcp/server/dhcpd.conf.5 @@ -541,9 +541,9 @@ primary server might look like this: failover peer "foo" { primary; address anthrax.rc.example.com; - port 519; + port 647; peer address trantor.rc.example.com; - peer port 520; + peer port 847; max-response-delay 60; max-unacked-updates 10; mclt 3600; @@ -617,7 +617,7 @@ statement 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 be omitted, in which case the IANA -assigned port number 647 will be used by default. +assigned port number 847 will be used by default. .RE .PP The