Regression in libbind's resolver initialization

Adam Tkac atkac at redhat.com
Mon Jul 2 15:24:14 UTC 2007


Mark Andrews napsal(a):
> 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 13:06:19 -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
> @@ -498,7 +498,7 @@
>  	if ((cp = getenv("RES_OPTIONS")) != NULL)
>  		res_setoptions(statp, cp, "env");
>  	statp->options |= RES_INIT;
> -	return (h_errno);
> +	return (statp->res_h_errno);
>  }
>  
>  static void
>   
Better solution than mine. I believe you could commit it into 9.5.0a6 or a7.

Adam



More information about the bind-workers mailing list