rpms/dhcp/devel dhcp-4.1.0-missing-ipv6-not-fatal.patch, NONE, 1.1 dhcp.spec, 1.240, 1.241

David Cantrell dcantrel at fedoraproject.org
Wed Feb 18 20:03:09 UTC 2009


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11180

Modified Files:
	dhcp.spec 
Added Files:
	dhcp-4.1.0-missing-ipv6-not-fatal.patch 
Log Message:
* Wed Feb 18 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-7
- Do not segfault if the ipv6 kernel module is not loaded (#486097)


dhcp-4.1.0-missing-ipv6-not-fatal.patch:

--- NEW FILE dhcp-4.1.0-missing-ipv6-not-fatal.patch ---
diff -up dhcp-4.1.0/common/discover.c.noipv6 dhcp-4.1.0/common/discover.c
--- dhcp-4.1.0/common/discover.c.noipv6	2009-02-18 09:40:45.000000000 -1000
+++ dhcp-4.1.0/common/discover.c	2009-02-18 09:43:53.000000000 -1000
@@ -447,9 +447,11 @@ begin_iface_scan(struct iface_conf_list 
 	if (ifaces->fp6 == NULL) {
 		log_error("Error opening '/proc/net/if_inet6' to "
 			  "list IPv6 interfaces; %m");
-		close(ifaces->sock);
+		if (ifaces->sock)
+			close(ifaces->sock);
 		ifaces->sock = -1;
-		fclose(ifaces->fp);
+		if (ifaces->fp)
+			fclose(ifaces->fp);
 		ifaces->fp = NULL;
 		return 0;
 	}
@@ -719,7 +721,7 @@ next_iface(struct iface_info *info, int 
 		return 1;
 	}
 #ifdef DHCPv6
-	if (!(*err)) {
+	if (!(*err) && ifaces->fp6) {
 		return next_iface6(info, err, ifaces);
 	}
 #endif
@@ -736,7 +738,8 @@ end_iface_scan(struct iface_conf_list *i
 	close(ifaces->sock);
 	ifaces->sock = -1;
 #ifdef DHCPv6
-	fclose(ifaces->fp6);
+	if (ifaces->fp6)
+		fclose(ifaces->fp6);
 	ifaces->fp6 = NULL;
 #endif
 }


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -r1.240 -r1.241
--- dhcp.spec	18 Feb 2009 04:12:59 -0000	1.240
+++ dhcp.spec	18 Feb 2009 20:02:39 -0000	1.241
@@ -4,7 +4,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.1.0
-Release:  6%{?dist}
+Release:  7%{?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.
@@ -43,6 +43,7 @@
 Patch16:  %{name}-4.1.0-garbage-chars.patch
 Patch17:  %{name}-4.1.0-port-validation.patch
 Patch18:  %{name}-4.1.0-invalid-dhclient-conf.patch
+Patch19:  %{name}-4.1.0-missing-ipv6-not-fatal.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf
@@ -177,6 +178,10 @@
 # (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #19147])
 %patch18 -p1
 
+# If the ipv6 kernel module is missing, do not segfault
+# (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #19367]
+%patch19 -p1
+
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 %{__install} -p -m 0644 %{SOURCE3} .
 %{__install} -p -m 0644 %{SOURCE4} doc/
@@ -414,6 +419,9 @@
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
 %changelog
+* Wed Feb 18 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-7
+- Do not segfault if the ipv6 kernel module is not loaded (#486097)
+
 * Mon Feb 16 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-6
 - Enable dhcpv6 support (#480798)
 - Fix config file migration in scriptlets (#480543)




More information about the fedora-extras-commits mailing list