Fix a bug that prevented us from configuring IPv6 nameservers.

This commit is contained in:
Nick Mathewson 2011-05-23 17:45:14 -04:00
parent 57ddda7845
commit 74760f1864

View File

@ -2393,7 +2393,7 @@ _evdns_nameserver_add_impl(struct evdns_base *base, const struct sockaddr *addre
evtimer_assign(&ns->timeout_event, ns->base->event_base, nameserver_prod_callback, ns);
ns->socket = socket(PF_INET, SOCK_DGRAM, 0);
ns->socket = socket(address->sa_family, SOCK_DGRAM, 0);
if (ns->socket < 0) { err = 1; goto out1; }
evutil_make_socket_closeonexec(ns->socket);
evutil_make_socket_nonblocking(ns->socket);