From: Mark Andrews Date: Mon, 16 Oct 2006 23:00:50 +0000 (+0000) Subject: 2096. [bug] libbind: handle applications that fail to detect X-Git-Tag: v9.3.3rc3~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=533f2d446e283b4c07fb04e1af1419e2ed1fa981;p=thirdparty%2Fbind9.git 2096. [bug] libbind: handle applications that fail to detect res_init() failures better. --- diff --git a/CHANGES b/CHANGES index 8ad422bfc12..c80a1fd9aa6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2096. [bug] libbind: handle applications that fail to detect + res_init() failures better. + 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] diff --git a/lib/bind/resolv/res_send.c b/lib/bind/resolv/res_send.c index 24527ead481..c47dd49bc6e 100644 --- a/lib/bind/resolv/res_send.c +++ b/lib/bind/resolv/res_send.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.8 2006/03/08 04:13:31 marka Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -295,7 +295,8 @@ res_nsend(res_state statp, highestFD = sysconf(_SC_OPEN_MAX) - 1; #endif - if (statp->nscount == 0) { + /* No name servers or res_init() failure */ + if (statp->nscount == 0 || EXT(statp).ext == NULL) { errno = ESRCH; return (-1); }