/[packages]/cauldron/dhcp/current/SOURCES/dhcp-4.2.2-missing-ipv6-not-fatal.patch
ViewVC logotype

Annotation of /cauldron/dhcp/current/SOURCES/dhcp-4.2.2-missing-ipv6-not-fatal.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 142669 - (hide annotations) (download)
Mon Sep 12 11:38:52 2011 UTC (12 years, 7 months ago) by guillomovitch
File size: 1055 byte(s)
SILENT: new file ./SOURCES/dhcp-4.2.2-missing-ipv6-not-fatal.patch
1 guillomovitch 142669 diff -Naur -x '*~' -x '*.rej' -x '*.orig' dhcp-4.2.2/common/discover.c dhcp-4.2.2-missing-ipv6-not-fatal/common/discover.c
2     --- dhcp-4.2.2/common/discover.c 2011-07-20 00:22:48.000000000 +0200
3     +++ dhcp-4.2.2-missing-ipv6-not-fatal/common/discover.c 2011-09-12 13:33:04.300509236 +0200
4     @@ -455,7 +455,7 @@
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", "r");
11     if (ifaces->fp6 == NULL) {
12     log_error("Error opening '/proc/net/if_inet6' to "
13     @@ -466,6 +466,8 @@
14     ifaces->fp = NULL;
15     return 0;
16     }
17     + } else {
18     + ifaces->fp6 = NULL;
19     }
20     #endif
21    
22     @@ -733,7 +735,7 @@
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     @@ -752,7 +754,8 @@
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

  ViewVC Help
Powered by ViewVC 1.1.30