- Do not segfault if the ipv6 kernel module is not loaded (#486097)
This commit is contained in:
parent
c3b67cdc64
commit
0adb5fbf9e
36
dhcp-4.1.0-missing-ipv6-not-fatal.patch
Normal file
36
dhcp-4.1.0-missing-ipv6-not-fatal.patch
Normal file
@ -0,0 +1,36 @@
|
||||
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
|
||||
}
|
10
dhcp.spec
10
dhcp.spec
@ -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 @@ Patch15: %{name}-4.1.0-inherit-leases.patch
|
||||
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 @@ libdhcpctl and libomapi static libraries are also included in this package.
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19147])
|
||||
%patch18 -p1
|
||||
|
||||
# If the ipv6 kernel module is missing, do not segfault
|
||||
# (Submitted to dhcp-bugs@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 @@ fi
|
||||
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
||||
|
||||
%changelog
|
||||
* Wed Feb 18 2009 David Cantrell <dcantrell@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@redhat.com> - 12:4.1.0-6
|
||||
- Enable dhcpv6 support (#480798)
|
||||
- Fix config file migration in scriptlets (#480543)
|
||||
|
Loading…
Reference in New Issue
Block a user