mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
39 lines
890 B
Diff
39 lines
890 B
Diff
--- 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
|