summaryrefslogtreecommitdiffstats
path: root/openwrt/toolchain/uClibc/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-04 21:05:07 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-04 21:05:07 +0000
commitac1214ccca809388ec0fdb846d443247ecb6b464 (patch)
treea10c8ae1875e5a1ce39b725f8d4c700ff8eae1d4 /openwrt/toolchain/uClibc/patches
parent6bf540bf24f6e222d9860aa67ace1ae3fc52f871 (diff)
fix ipv6 host name lookup from /etc/hosts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@559 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/toolchain/uClibc/patches')
-rw-r--r--openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch b/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch
new file mode 100644
index 000000000..fd1aaa1d2
--- /dev/null
+++ b/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch
@@ -0,0 +1,24 @@
+diff -urN uClibc-0.9.27.old/libc/inet/resolv.c uClibc-0.9.27/libc/inet/resolv.c
+--- uClibc-0.9.27.old/libc/inet/resolv.c 2005-01-12 08:59:21.000000000 +0100
++++ uClibc-0.9.27/libc/inet/resolv.c 2005-04-04 22:14:38.000000000 +0200
+@@ -2029,7 +2029,7 @@
+ int old_errno = errno; /* Save the old errno and reset errno */
+ __set_errno(0); /* to check for missing /etc/hosts. */
+
+- if ((i=__get_hosts_byname_r(name, AF_INET, result_buf,
++ if ((i=__get_hosts_byname_r(name, AF_INET6, result_buf,
+ buf, buflen, result, h_errnop))==0)
+ return i;
+ switch (*h_errnop) {
+diff -urN uClibc-0.9.27.old/libc/inet/resolv.c uClibc-0.9.27/libc/inet/resolv.c
+--- uClibc-0.9.27.old/libc/inet/resolv.c 2005-04-04 22:16:54.000000000 +0200
++++ uClibc-0.9.27/libc/inet/resolv.c 2005-04-04 22:46:59.000000000 +0200
+@@ -1513,7 +1513,7 @@
+ } else {
+ DPRINTF("Error\n");
+ ret=TRY_AGAIN;
+- break; /* bad ip address */
++ continue; /* bad ip address, ignore */
+ }
+
+ if (action!=GETHOSTENT) {