This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated via 3c1457161e5206c2d576ab25d350a139511c096d (commit) via 8c85b44f6ab42561207365f19b9d1fd69d960771 (commit) via 2ac8348609b63d6f3a87cb27ce17deff889c6a73 (commit) from 3c67c044f93b452aa483eb1246195ebb4443cb44 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 3c1457161e5206c2d576ab25d350a139511c096d Author: Peter Korsgaard peter@korsgaard.com Date: Wed Mar 9 22:49:07 2016 +0100
getaddrinfo: correct AI_V4MAPPED handling
As recently reported on the Buildroot list: http://lists.busybox.net/pipermail/buildroot/2016-March/155325.html
DNS lookups with Node.js currently fails on uClibc-ng. The reason for this is the way AI_V4MAPPED is handled. According to POSIX, AI_V4MAPPED should be ignored unless ai_family is AF_INET6:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html
If the AI_V4MAPPED flag is specified along with an ai_family of AF_INET6, then getaddrinfo() shall return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses (ai_addrlen shall be 16). The AI_V4MAPPED flag shall be ignored unless ai_family equals AF_INET6.
uClibc-ng was also handling AI_V4MAPPED for AF_UNSPEC, fix that.
Signed-off-by: Peter Korsgaard peter@korsgaard.com
commit 8c85b44f6ab42561207365f19b9d1fd69d960771 Author: Tim Hockin thockin@google.com Date: Wed Mar 9 22:12:23 2016 +0100
DNS: Don't apply search domains to PTR lookups
This lessens the load on upstream DNS servers (and it was just nonsensical).
Signed-off-by: Tim Hockin thockin@google.com
commit 2ac8348609b63d6f3a87cb27ce17deff889c6a73 Author: Tim Hockin thockin@google.com Date: Wed Mar 9 21:48:32 2016 +0100
DNS: don't count search-path miss as a retry
Currently a miss on a search-path entry is counted as a retry. This means that users with more than (num_nameservers * retries) entries in their search path list fail before trying all search paths. Concretely, a single nameserver with 4 search paths will never try the 4th search because the default retry is 3.
The code doesn't currently retry a given nameserver in case of an error, so retries is sort of meaningless (though there are some comments indicating it might come). This change only treats total failure of a nameserver (try next server) as a retry.
Signed-off-by: Tim Hockin thockin@google.com
-----------------------------------------------------------------------
Summary of changes: libc/inet/getaddrinfo.c | 3 +-- libc/inet/resolv.c | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index 090d7e9..7ae32be 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -404,8 +404,7 @@ gaih_inet(const char *name, const struct gaih_service *service, struct gaih_servtuple *st; struct gaih_addrtuple *at; int rc; - int v4mapped = (req->ai_family == PF_UNSPEC || req->ai_family == PF_INET6) - && (req->ai_flags & AI_V4MAPPED); + int v4mapped = req->ai_family == PF_INET6 && (req->ai_flags & AI_V4MAPPED); unsigned seen = 0; if (req->ai_flags & AI_ADDRCONFIG) { /* "seen" is only used when AI_ADDRCONFIG is specified. diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 4b33896..f378c9b 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1264,7 +1264,7 @@ int __dns_lookup(const char *name, int variant = -1; /* search domain to append, -1: none */ int local_ns_num = -1; /* Nth server to use */ int local_id = local_id; /* for compiler */ - int sdomains; + int sdomains = 0; bool ends_with_dot; sockaddr46_t sa;
@@ -1302,7 +1302,9 @@ int __dns_lookup(const char *name, * or do other Really Bad Things. */ __UCLIBC_MUTEX_LOCK(__resolv_lock); __open_nameservers(); - sdomains = __searchdomains; + if (type != T_PTR) { + sdomains = __searchdomains; + } lookup[name_len] = '\0'; if ((unsigned)variant < sdomains) { /* lookup is name_len + 1 + MAXLEN_searchdomain + 1 long */ @@ -1320,7 +1322,6 @@ int __dns_lookup(const char *name, local_ns_num = last_ns_num; retries_left = __nameservers * __resolv_attempts; } - retries_left--; if (local_ns_num >= __nameservers) local_ns_num = 0; local_id++; @@ -1572,6 +1573,7 @@ int __dns_lookup(const char *name,
try_next_server: /* Try next nameserver */ + retries_left--; local_ns_num++; variant = -1; } while (retries_left > 0);
hooks/post-receive