From: Rich Felker Date: Tue, 3 Jun 2014 05:46:40 +0000 (-0400) Subject: fix negative response and non-response handling for dns queries X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=d85d261ee601f7ccf0bb19c38c69e406a664fe8e;hp=ac2a7893427b6c94f05609d214178f8d5a18b333;p=musl fix negative response and non-response handling for dns queries previously, all failures to obtain at least one address were treated as nonexistant names (EAI_NONAME). this failed to account for the possibility of transient failures (no response at all, or a response with rcode of 2, server failure) or permanent failures that do not indicate the nonexistence of the requested name. only an rcode of 3 should be treated as an indication of nonexistence. --- diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c index 8d41627a..02920930 100644 --- a/src/network/lookup_name.c +++ b/src/network/lookup_name.c @@ -151,7 +151,10 @@ static int name_from_dns(struct address buf[static MAXADDRS], char canon[static for (i=0; i