[dhcp/f16] revert change made in 4.2.3-2 because of failing failover inicialization (#765967)

Jiří Popelka jpopelka at fedoraproject.org
Mon Jan 23 15:09:07 UTC 2012


commit c13ae11665f0aee36d94f0d9417d9dcffb1790c0
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Mon Jan 23 16:03:45 2012 +0100

    revert change made in 4.2.3-2 because of failing failover inicialization (#765967)
    
    dhclient-script: allow static route with a 0.0.0.0 next-hop address (#769463)

 dhclient-script                        |   11 +-
 dhcp-4.2.0-CLOEXEC.patch               |  422 --------------------------------
 dhcp-4.2.1-P1-CVE-2011-0997.patch      |   16 --
 dhcp-4.2.1-invalid-dhclient-conf.patch |   12 -
 dhcp-4.2.3-paranoia.patch              |   71 +-----
 dhcp.spec                              |   10 +-
 6 files changed, 19 insertions(+), 523 deletions(-)
---
diff --git a/dhclient-script b/dhclient-script
index 86fc22f..0294766 100644
--- a/dhclient-script
+++ b/dhclient-script
@@ -427,7 +427,10 @@ dhconfig() {
                 fi
                 gateway=${static_routes[$i+1]}
 
-                if is_router_reachable ${gateway}; then
+                # special case 0.0.0.0 to allow static routing for link-local addresses
+                # (including IPv4 multicast) which will not have a next-hop (#769463)
+                if [ "${gateway}" = "0.0.0.0" ] ||
+                   is_router_reachable ${gateway}; then
                     metric=''
                     for t in ${route_targets[@]}; do
                         if [ ${t} = ${target} ]; then
@@ -456,11 +459,9 @@ dhconfig() {
 
         # gateways
         if [[ ( "${DEFROUTE}" != "no" ) &&
-              (( -z "${GATEWAYDEV}" ) ||
-               ( "${GATEWAYDEV}" = "${interface}" )) ]]; then
+              (( -z "${GATEWAYDEV}" ) || ( "${GATEWAYDEV}" = "${interface}" )) ]]; then
             if [[ ( -z "$GATEWAY" ) ||
-                  (( -n "$DHCLIENT_IGNORE_GATEWAY" ) &&
-                   ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* )) ]]; then
+                  (( -n "$DHCLIENT_IGNORE_GATEWAY" ) && ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* )) ]]; then
                 metric="${METRIC:-}"
                 let i="${METRIC:-0}"
                 default_routers=()
diff --git a/dhcp-4.2.3-paranoia.patch b/dhcp-4.2.3-paranoia.patch
index 4139ce9..e6c1576 100644
--- a/dhcp-4.2.3-paranoia.patch
+++ b/dhcp-4.2.3-paranoia.patch
@@ -1,48 +1,7 @@
-diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c
---- dhcp-4.2.3/server/dhcpd.c.paranoia	2011-10-26 19:10:08.162925489 +0200
-+++ dhcp-4.2.3/server/dhcpd.c	2011-10-26 19:12:34.541095509 +0200
-@@ -699,11 +699,11 @@ main(int argc, char **argv) {
- 
- 	group_write_hook = group_writer;
- 
--	/* Start up the database... */
--	db_startup (lftest);
--
--	if (lftest)
-+	if (lftest) {
-+		/* Start up the database... */
-+		db_startup (lftest);
- 		exit (0);
-+	}
- 
- 	/* Discover all the network interfaces and initialize them. */
- 	discover_interfaces(DISCOVER_SERVER);
-@@ -743,24 +743,6 @@ main(int argc, char **argv) {
- #if defined (TRACING)
- 	trace_seed_stash (trace_srandom, seed + cur_time);
- #endif
--	postdb_startup ();
--
--#ifdef DHCPv6
--	/*
--	 * Set server DHCPv6 identifier.
--	 * See dhcpv6.c for discussion of setting DUID.
--	 */
--	if (set_server_duid_from_option() == ISC_R_SUCCESS) {
--		write_server_duid();
--	} else {
--		if (!server_duid_isset()) {
--			if (generate_new_server_duid() != ISC_R_SUCCESS) {
--				log_fatal("Unable to set server identifier.");
--			}
--			write_server_duid();
--		}
--	}
--#endif /* DHCPv6 */
- 
- #ifndef DEBUG
- 	if (daemon) {
-@@ -771,22 +753,6 @@ main(int argc, char **argv) {
+diff -up dhcp-4.2.3-P1/server/dhcpd.c.paranoia dhcp-4.2.3-P1/server/dhcpd.c
+--- dhcp-4.2.3-P1/server/dhcpd.c.paranoia	2011-12-20 18:02:26.000000000 +0100
++++ dhcp-4.2.3-P1/server/dhcpd.c	2011-12-20 18:03:43.840037108 +0100
+@@ -771,22 +771,6 @@ main(int argc, char **argv) {
  			exit (0);
  	}
   
@@ -65,7 +24,7 @@ diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c
  	/*
  	 * Deal with pid files.  If the user told us
  	 * not to write a file we don't read one either
-@@ -823,6 +789,42 @@ main(int argc, char **argv) {
+@@ -823,6 +807,22 @@ main(int argc, char **argv) {
  		}
  	}
  
@@ -85,26 +44,6 @@ diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c
 +	}
 +#endif /* PARANOIA */
 +
-+	db_startup(lftest);
-+	postdb_startup ();
-+
-+#ifdef DHCPv6
-+	/*
-+	 * Set server DHCPv6 identifier.
-+	 * See dhcpv6.c for discussion of setting DUID.
-+	 */
-+	if (set_server_duid_from_option() == ISC_R_SUCCESS) {
-+		write_server_duid();
-+	} else {
-+		if (!server_duid_isset()) {
-+			if (generate_new_server_duid() != ISC_R_SUCCESS) {
-+				log_fatal("Unable to set server identifier.");
-+			}
-+			write_server_duid();
-+		}
-+	}
-+#endif /* DHCPv6 */
-+
  	/* If we were requested to log to stdout on the command line,
  	   keep doing so; otherwise, stop. */
  	if (log_perror == -1)
diff --git a/dhcp.spec b/dhcp.spec
index a268520..031e939 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -19,7 +19,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.2.3
-Release:  5.%{patchver}%{?dist}
+Release:  6.%{patchver}%{?dist}
 # NEVER CHANGE THE EPOCH on this package.  The previous maintainer (prior to
 # dcantrell maintaining the package) made incorrect use of the epoch and
 # that's why it is at 12 now.  It should have never been used, but it was.
@@ -28,7 +28,7 @@ Epoch:    12
 License:  ISC
 Group:    System Environment/Daemons
 URL:      http://isc.org/products/DHCP/
-Source0:  ftp://ftp.isc.org/isc/dhcp/dhcp-%{VERSION}.tar.gz
+Source0:  ftp://ftp.isc.org/isc/dhcp/%{VERSION}/dhcp-%{VERSION}.tar.gz
 Source1:  dhcpd.init
 Source2:  dhcpd6.init
 Source3:  dhcrelay.init
@@ -641,6 +641,12 @@ fi
 %{_initddir}/dhcrelay
 
 %changelog
+* Mon Jan 23 2012 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.3-6.P2
+- revert change made in 4.2.3-2 because of failing failover inicialization (#765967)
+  the procedure is now:
+  init lease file, init failover, init PID file, change effective user/group ID
+- dhclient-script: allow static route with a 0.0.0.0 next-hop address (#769463)
+
 * Fri Jan 13 2012 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.3-5.P2
 - 4.2.3-P2: fix for CVE-2011-4868 (#781246)
 


More information about the scm-commits mailing list