[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16674: {tor} Oops; set address families on nameservers. (tor/trunk/src/or)



Author: nickm
Date: 2008-08-27 10:12:10 -0400 (Wed, 27 Aug 2008)
New Revision: 16674

Modified:
   tor/trunk/src/or/eventdns.c
Log:
Oops; set address families on nameservers.

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2008-08-27 08:36:37 UTC (rev 16673)
+++ tor/trunk/src/or/eventdns.c	2008-08-27 14:12:10 UTC (rev 16674)
@@ -2310,6 +2310,7 @@
 	assert(addr_part);
 	if (is_ipv6) {
 		struct sockaddr_in6 sin6;
+		sin6.sin6_family = AF_INET6;
 		sin6.sin6_port = htons(port);
 		if (1 != tor_inet_pton(AF_INET6, addr_part, &sin6.sin6_addr))
 			return 4;
@@ -2317,6 +2318,7 @@
 										  sizeof(sin6));
 	} else {
 		struct sockaddr_in sin;
+		sin.sin_family = AF_INET;
 		sin.sin_port = htons(port);
 		if (!inet_aton(addr_part, &sin.sin_addr))
 			return 4;