[dhcp] remove missing-ipv6-not-fatal.patch
Jiří Popelka
jpopelka at fedoraproject.org
Thu Jan 24 12:07:52 UTC 2013
commit 7dd2c30c88ea7386c70c2bc31748e70f4fa9e784
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Thu Jan 24 13:03:41 2013 +0100
remove missing-ipv6-not-fatal.patch
because the concerning code is later
removed with getifaddrs.patch
dhcp-4.2.0-missing-ipv6-not-fatal.patch | 40 -----------------------------
dhcp-4.2.2-CLOEXEC.patch | 21 ---------------
dhcp-4.2.4-getifaddrs.patch | 42 ++++++++++++++++++++-----------
dhcp.spec | 11 +++----
4 files changed, 32 insertions(+), 82 deletions(-)
---
diff --git a/dhcp-4.2.2-CLOEXEC.patch b/dhcp-4.2.2-CLOEXEC.patch
index 1198f77..1f4538e 100644
--- a/dhcp-4.2.2-CLOEXEC.patch
+++ b/dhcp-4.2.2-CLOEXEC.patch
@@ -133,27 +133,6 @@ diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
if (sock < 0) {
if (errno == EBUSY) {
continue;
-diff -up dhcp-4.2.2b1/common/discover.c.cloexec dhcp-4.2.2b1/common/discover.c
---- dhcp-4.2.2b1/common/discover.c.cloexec 2011-06-27 18:18:20.000000000 +0200
-+++ dhcp-4.2.2b1/common/discover.c 2011-07-01 14:13:31.031887673 +0200
-@@ -421,7 +421,7 @@ begin_iface_scan(struct iface_conf_list
- int len;
- int i;
-
-- ifaces->fp = fopen("/proc/net/dev", "r");
-+ ifaces->fp = fopen("/proc/net/dev", "re");
- if (ifaces->fp == NULL) {
- log_error("Error opening '/proc/net/dev' to list interfaces");
- return 0;
-@@ -456,7 +456,7 @@ begin_iface_scan(struct iface_conf_list
-
- #ifdef DHCPv6
- if (local_family == AF_INET6) {
-- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
-+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
--- dhcp-4.2.2b1/common/dlpi.c.cloexec 2011-07-01 14:13:30.977887712 +0200
+++ dhcp-4.2.2b1/common/dlpi.c 2011-07-01 14:13:31.032887673 +0200
diff --git a/dhcp-4.2.4-getifaddrs.patch b/dhcp-4.2.4-getifaddrs.patch
index fe22da0..330a1fc 100644
--- a/dhcp-4.2.4-getifaddrs.patch
+++ b/dhcp-4.2.4-getifaddrs.patch
@@ -1,7 +1,19 @@
-diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discover.c
---- dhcp-4.2.4rc2/common/discover.c.getifaddrs 2012-05-25 18:05:29.592024035 +0200
-+++ dhcp-4.2.4rc2/common/discover.c 2012-05-25 18:12:05.254266023 +0200
-@@ -379,394 +379,13 @@ end_iface_scan(struct iface_conf_list *i
+From c09dd24a7d63988e0acef7d033bd3e088fc005c0 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka at redhat.com>
+Date: Thu, 24 Jan 2013 12:39:50 +0100
+Subject: [PATCH] Linux interface discovery
+
+Use the same discovery code as for *BSD and OS X,
+i.e. the getifaddrs() function.
+---
+ common/discover.c | 398 +++---------------------------------------------------
+ 1 file changed, 17 insertions(+), 381 deletions(-)
+
+diff --git a/common/discover.c b/common/discover.c
+index 1d84219..f2a8f6d 100644
+--- a/common/discover.c
++++ b/common/discover.c
+@@ -379,391 +379,13 @@ end_iface_scan(struct iface_conf_list *ifaces) {
ifaces->sock = -1;
}
@@ -47,7 +59,7 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
- int len;
- int i;
-
-- ifaces->fp = fopen("/proc/net/dev", "re");
+- ifaces->fp = fopen("/proc/net/dev", "r");
- if (ifaces->fp == NULL) {
- log_error("Error opening '/proc/net/dev' to list interfaces");
- return 0;
@@ -81,8 +93,8 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
- }
-
-#ifdef DHCPv6
-- if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
-- ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
+- if (local_family == AF_INET6) {
+- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
@@ -92,8 +104,6 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
- ifaces->fp = NULL;
- return 0;
- }
-- } else {
-- ifaces->fp6 = NULL;
- }
-#endif
-
@@ -361,7 +371,7 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
- return 1;
- }
-#ifdef DHCPv6
-- if (!(*err) && ifaces->fp6) {
+- if (!(*err)) {
- if (local_family == AF_INET6)
- return next_iface6(info, err, ifaces);
- }
@@ -380,8 +390,7 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
- ifaces->sock = -1;
-#ifdef DHCPv6
- if (local_family == AF_INET6) {
-- if (ifaces->fp6)
-- fclose(ifaces->fp6);
+- fclose(ifaces->fp6);
- ifaces->fp6 = NULL;
- }
-#endif
@@ -393,11 +402,11 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
* -----------
*
- * FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs()
-+ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
++ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
* function.
*
* The getifaddrs() man page describes the use.
-@@ -814,6 +433,8 @@ begin_iface_scan(struct iface_conf_list
+@@ -811,6 +433,8 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
*/
int
next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
@@ -406,7 +415,7 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
if (ifaces->next == NULL) {
*err = 0;
return 0;
-@@ -825,8 +446,20 @@ next_iface(struct iface_info *info, int
+@@ -822,8 +446,20 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
return 0;
}
strcpy(info->name, ifaces->next->ifa_name);
@@ -429,3 +438,6 @@ diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discove
info->flags = ifaces->next->ifa_flags;
ifaces->next = ifaces->next->ifa_next;
*err = 0;
+--
+1.8.1
+
diff --git a/dhcp.spec b/dhcp.spec
index 416cd8b..4a22225 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.2.5
-Release: 4%{?dist}
+Release: 5%{?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.
@@ -49,7 +49,6 @@ Patch10: dhcp-4.2.5-manpages.patch
Patch11: dhcp-4.2.4-paths.patch
Patch12: dhcp-4.2.2-CLOEXEC.patch
Patch14: dhcp-4.2.0-garbage-chars.patch
-Patch15: dhcp-4.2.0-missing-ipv6-not-fatal.patch
Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch
Patch18: dhcp-4.2.4-64_bit_lease_parse.patch
Patch19: dhcp-4.2.2-capability.patch
@@ -228,10 +227,6 @@ rm -rf includes/isc-dhcp
# Fix 'garbage in format string' error (#450042)
%patch14 -p1 -b .garbage
-# If the ipv6 kernel module is missing, do not segfault
-# (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #19367])
-%patch15 -p1 -b .noipv6
-
# Handle cases in add_timeout() where the function is called with a NULL
# value for the 'when' parameter
# (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #19867])
@@ -582,6 +577,10 @@ done
%changelog
+* Thu Jan 24 2013 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.5-5
+- remove missing-ipv6-not-fatal.patch because the concerning code is later
+ removed with getifaddrs.patch
+
* Wed Jan 23 2013 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.5-4
- Make sure range6 is correct for subnet6 where it's declared (#902966)
More information about the scm-commits
mailing list