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

(-)a/libmilter/sm_gethost.c (-2 / +4 lines)
Lines 51-68 sm_getipnodebyname(name, family, flags, 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
	if (family == AF_INET6)
55
	if (family == AF_INET6)
56
	{
56
	{
57
		/* From RFC2133, section 6.1 */
57
		/* From RFC2133, section 6.1 */
58
		resv6 = bitset(RES_USE_INET6, _res.options);
58
		resv6 = bitset(RES_USE_INET6, _res.options);
59
		_res.options |= RES_USE_INET6;
59
		_res.options |= RES_USE_INET6;
60
	}
60
	}
61
#endif
61
	SM_SET_H_ERRNO(0);
62
	SM_SET_H_ERRNO(0);
62
	h = gethostbyname(name);
63
	h = gethostbyname(name);
64
#ifdef RES_USE_INET6
63
	if (family == AF_INET6 && !resv6)
65
	if (family == AF_INET6 && !resv6)
64
		_res.options &= ~RES_USE_INET6;
66
		_res.options &= ~RES_USE_INET6;
65
67
#endif
66
	/* the function is supposed to return only the requested family */
68
	/* the function is supposed to return only the requested family */
67
	if (h != NULL && h->h_addrtype != family)
69
	if (h != NULL && h->h_addrtype != family)
68
	{
70
	{

Return to bug 691692