]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/dhcp-4.2.0-missing-ipv6-not-fatal.patch
udev: remove /var/run mount from initskript.
[people/teissler/ipfire-2.x.git] / src / patches / dhcp-4.2.0-missing-ipv6-not-fatal.patch
1 diff -up dhcp-4.2.0/common/discover.c.noipv6 dhcp-4.2.0/common/discover.c
2 --- dhcp-4.2.0/common/discover.c.noipv6 2010-07-21 14:31:13.000000000 +0200
3 +++ dhcp-4.2.0/common/discover.c 2010-07-21 16:04:57.000000000 +0200
4 @@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list
5 }
6
7 #ifdef DHCPv6
8 - if (local_family == AF_INET6) {
9 + if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
10 ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
11 if (ifaces->fp6 == NULL) {
12 log_error("Error opening '/proc/net/if_inet6' to "
13 @@ -454,6 +454,8 @@ begin_iface_scan(struct iface_conf_list
14 ifaces->fp = NULL;
15 return 0;
16 }
17 + } else {
18 + ifaces->fp6 = NULL;
19 }
20 #endif
21
22 @@ -721,7 +723,7 @@ next_iface(struct iface_info *info, int
23 return 1;
24 }
25 #ifdef DHCPv6
26 - if (!(*err)) {
27 + if (!(*err) && ifaces->fp6) {
28 if (local_family == AF_INET6)
29 return next_iface6(info, err, ifaces);
30 }
31 @@ -740,7 +742,8 @@ end_iface_scan(struct iface_conf_list *i
32 ifaces->sock = -1;
33 #ifdef DHCPv6
34 if (local_family == AF_INET6) {
35 - fclose(ifaces->fp6);
36 + if (ifaces->fp6)
37 + fclose(ifaces->fp6);
38 ifaces->fp6 = NULL;
39 }
40 #endif