Regression in libbind's resolver initialization

Adam Tkac atkac at redhat.com
Fri Jun 29 09:13:07 UTC 2007


Mark Andrews napsal(a):
>> Hi all,
>>
>> looks that
>>
>> 2119.   [compat]        libbind: allow res_init() to succeed enough to
>>                         return the default domain even if it was unable
>>                         to allocate memory.
>>     
>
> Index: resolv/res_init.c
> ===================================================================
> RCS file: /proj/cvs/prod/bind9/lib/bind/resolv/res_init.c,v
> retrieving revision 1.22
> diff -u -r1.22 res_init.c
> --- resolv/res_init.c	11 Dec 2006 04:35:39 -0000	1.22
> +++ resolv/res_init.c	29 Jun 2007 02:50:20 -0000
> @@ -168,7 +168,7 @@
>  	union res_sockaddr_union u[2];
>  	int maxns = MAXNS;
>  
> -	h_errno = 0;
> +	RES_SET_H_ERRNO(statp, 0);
>  	if (statp->_u._ext.ext != NULL)
>  		res_ndestroy(statp);
>  
> @@ -231,7 +231,7 @@
>  		 * to check our return code wont be able to make
>  		 * queries anyhow.
>  		 */
> -		h_errno = statp->res_h_errno = NETDB_INTERNAL;
> +		RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
>  		maxns = 0;
>  	}
>  #ifdef RESOLVSORT
>   
Still have same problems with your solution. Proposed patch is attached
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-9.5.0-errno-init.patch
Type: text/x-patch
Size: 2188 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind-workers/attachments/20070629/28c02400/attachment.bin>


More information about the bind-workers mailing list