]> git.pld-linux.org Git - packages/dhcp.git/commitdiff
- don't require ipv6 support in kernel
authorzbyniu <zbyniu@pld-linux.org>
Mon, 8 Dec 2008 12:43:11 +0000 (12:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp-no-ipv6.patch -> 1.1

dhcp-no-ipv6.patch [new file with mode: 0644]

diff --git a/dhcp-no-ipv6.patch b/dhcp-no-ipv6.patch
new file mode 100644 (file)
index 0000000..28952c9
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/common/discover.c~       2008-09-09 22:29:01.326643118 +0200
++++ a/common/discover.c        2008-09-09 22:34:07.565778860 +0200
+@@ -421,6 +421,7 @@ begin_iface_scan(struct iface_conf_list 
+       }
+ #ifdef DHCPv6
++      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 "
+@@ -431,6 +432,7 @@ begin_iface_scan(struct iface_conf_list 
+               ifaces->fp = NULL;
+               return 0;
+       }
++      }
+ #endif
+       return 1;
+@@ -700,9 +700,11 @@ next_iface(struct iface_info *info, int 
+               return 1;
+       }
+ #ifdef DHCPv6
++      if (local_family == AF_INET6) {
+       if (!(*err)) {
+               return next_iface6(info, err, ifaces);
+       }
++      }
+ #endif
+       return 0;
+ }
+@@ -719,7 +719,8 @@ end_iface_scan(struct iface_conf_list *i
+       close(ifaces->sock);
+       ifaces->sock = -1;
+ #ifdef DHCPv6
+-      fclose(ifaces->fp6);
++      if (local_family == AF_INET6)
++              fclose(ifaces->fp6);
+       ifaces->fp6 = NULL;
+ #endif
+ }
This page took 0.054325 seconds and 4 git commands to generate.