summaryrefslogtreecommitdiff
path: root/package/dhcp/patches/patch-common_discover_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-13 17:15:01 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-13 17:15:01 +0200
commitd2e5a673aa7637c990ca7307e831327eb67e3fe7 (patch)
tree70e2d421684317208dc94db354551aca749b3328 /package/dhcp/patches/patch-common_discover_c
parenta8259a651484f6dd5051a20e64f43ae27fc04613 (diff)
parent6d7a7f4776711758cf5b59028378f01cd8eba493 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/dhcp/patches/patch-common_discover_c')
-rw-r--r--package/dhcp/patches/patch-common_discover_c13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/dhcp/patches/patch-common_discover_c b/package/dhcp/patches/patch-common_discover_c
new file mode 100644
index 000000000..8f74086ff
--- /dev/null
+++ b/package/dhcp/patches/patch-common_discover_c
@@ -0,0 +1,13 @@
+--- dhcp-4.1.0.orig/common/discover.c 2008-08-29 19:48:57.000000000 +0200
++++ dhcp-4.1.0/common/discover.c 2009-06-12 21:18:42.000000000 +0200
+@@ -684,8 +684,8 @@ next_iface6(struct iface_info *info, int
+ for (i=0; i<16; i++) {
+ unsigned char byte;
+ static const char hex[] = "0123456789abcdef";
+- byte = ((index(hex, buf[i * 2]) - hex) << 4) |
+- (index(hex, buf[i * 2 + 1]) - hex);
++ byte = ((strchr(hex, buf[i * 2]) - hex) << 4) |
++ (strchr(hex, buf[i * 2 + 1]) - hex);
+ addr.sin6_addr.s6_addr[i] = byte;
+ }
+ memcpy(&info->addr, &addr, sizeof(addr));