Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 700108
Collapse All | Expand All

(-)sendmail-8.15.2-r1/libmilter/sm_gethost.c.orig (-1 / +5 lines)
Lines 51-68 Link Here
51
{
51
{
52
	bool resv6 = true;
52
	bool resv6 = true;
53
	struct hostent *h;
53
	struct hostent *h;
54
54
#ifdef RES_USE_INET6
55
	
55
	if (family == AF_INET6)
56
	if (family == AF_INET6)
56
	{
57
	{
57
		/* From RFC2133, section 6.1 */
58
		/* From RFC2133, section 6.1 */
58
		resv6 = bitset(RES_USE_INET6, _res.options);
59
		resv6 = bitset(RES_USE_INET6, _res.options);
59
		_res.options |= RES_USE_INET6;
60
		_res.options |= RES_USE_INET6;
60
	}
61
	}
62
#endif
61
	SM_SET_H_ERRNO(0);
63
	SM_SET_H_ERRNO(0);
62
	h = gethostbyname(name);
64
	h = gethostbyname(name);
65
#ifdef RES_USE_INET6
63
	if (family == AF_INET6 && !resv6)
66
	if (family == AF_INET6 && !resv6)
64
		_res.options &= ~RES_USE_INET6;
67
		_res.options &= ~RES_USE_INET6;
65
68
69
	#endif
66
	/* the function is supposed to return only the requested family */
70
	/* the function is supposed to return only the requested family */
67
	if (h != NULL && h->h_addrtype != family)
71
	if (h != NULL && h->h_addrtype != family)
68
	{
72
	{
(-)sendmail-8.15.2-r2/sendmail/conf.c.orig (-1 / +4 lines)
Lines 4243-4260 Link Here
4243
4243
4244
# else /* HAS_GETHOSTBYNAME2 */
4244
# else /* HAS_GETHOSTBYNAME2 */
4245
	bool resv6 = true;
4245
	bool resv6 = true;
4246
4246
#ifdef RES_USE_INET6
4247
	if (family == AF_INET6)
4247
	if (family == AF_INET6)
4248
	{
4248
	{
4249
		/* From RFC2133, section 6.1 */
4249
		/* From RFC2133, section 6.1 */
4250
		resv6 = bitset(RES_USE_INET6, _res.options);
4250
		resv6 = bitset(RES_USE_INET6, _res.options);
4251
		_res.options |= RES_USE_INET6;
4251
		_res.options |= RES_USE_INET6;
4252
	}
4252
	}
4253
#endif	
4253
	SM_SET_H_ERRNO(0);
4254
	SM_SET_H_ERRNO(0);
4254
	h = gethostbyname(name);
4255
	h = gethostbyname(name);
4256
#ifdef RES_USE_INET6	
4255
	if (!resv6)
4257
	if (!resv6)
4256
		_res.options &= ~RES_USE_INET6;
4258
		_res.options &= ~RES_USE_INET6;
4257
4259
4260
#endif
4258
	/* the function is supposed to return only the requested family */
4261
	/* the function is supposed to return only the requested family */
4259
	if (h != NULL && h->h_addrtype != family)
4262
	if (h != NULL && h->h_addrtype != family)
4260
	{
4263
	{

Return to bug 700108