From 367794ce02d696c2b62d0cca5d3e7a1211c0c28a Mon Sep 17 00:00:00 2001 From: Steven Murdoch Date: Wed, 1 Dec 2010 15:40:11 +0000 Subject: Open connection to DNS resolvers with CLOEXEC flag set NB: this will now register the socket with the socket accounting code --- src/or/eventdns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 0665cf53e..4c6f60e89 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -2286,7 +2286,7 @@ _evdns_nameserver_add_impl(const struct sockaddr *address, evtimer_set(&ns->timeout_event, nameserver_prod_callback, ns); - ns->socket = socket(PF_INET, SOCK_DGRAM, 0); + ns->socket = tor_open_socket(PF_INET, SOCK_DGRAM, 0); if (ns->socket < 0) { err = 1; goto out1; } #ifdef WIN32 { @@ -3455,7 +3455,7 @@ main(int c, char **v) { if (servertest) { int sock; struct sockaddr_in my_addr; - sock = socket(PF_INET, SOCK_DGRAM, 0); + sock = tor_open_socket(PF_INET, SOCK_DGRAM, 0); fcntl(sock, F_SETFL, O_NONBLOCK); my_addr.sin_family = AF_INET; my_addr.sin_port = htons(10053); -- cgit v1.2.3