summaryrefslogtreecommitdiffstats
path: root/abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch')
-rw-r--r--abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch b/abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch
new file mode 100644
index 0000000..cc5ddb8
--- /dev/null
+++ b/abs/not_built/core/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch
@@ -0,0 +1,39 @@
+--- common/discover.c 2009-09-29 21:44:49.000000000 +0200
++++ common/discover.c_new 2010-06-30 19:40:02.000000000 +0200
+@@ -443,7 +443,7 @@
+ }
+
+ #ifdef DHCPv6
+- if (local_family == AF_INET6) {
++ if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ if (ifaces->fp6 == NULL) {
+ log_error("Error opening '/proc/net/if_inet6' to "
+@@ -454,6 +454,8 @@
+ ifaces->fp = NULL;
+ return 0;
+ }
++ } else {
++ ifaces->fp6 = NULL;
+ }
+ #endif
+
+@@ -721,7 +723,7 @@
+ return 1;
+ }
+ #ifdef DHCPv6
+- if (!(*err)) {
++ if (!(*err) && ifaces->fp6) {
+ if (local_family == AF_INET6)
+ return next_iface6(info, err, ifaces);
+ }
+@@ -740,7 +742,8 @@
+ ifaces->sock = -1;
+ #ifdef DHCPv6
+ if (local_family == AF_INET6) {
+- fclose(ifaces->fp6);
++ if(ifaces->fp6)
++ fclose(ifaces->fp6);
+ ifaces->fp6 = NULL;
+ }
+ #endif