mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Merge branch 'maint-0.4.5' into maint-0.4.6
This commit is contained in:
commit
16cbbf04c4
6
changes/bug40371
Normal file
6
changes/bug40371
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Minor bugfixes (compatibility):
|
||||||
|
- Fix compatibility with the most recent Libevent versions, which
|
||||||
|
no longer have an evdns_set_random_bytes() function. Because
|
||||||
|
this function has been a no-op since Libevent 2.0.4-alpha,
|
||||||
|
it is safe for us to just stop calling it. Fixes bug 40371;
|
||||||
|
bugfix on 0.2.1.7-alpha.
|
@ -212,20 +212,11 @@ evdns_log_cb(int warn, const char *msg)
|
|||||||
tor_log(severity, LD_EXIT, "eventdns: %s", msg);
|
tor_log(severity, LD_EXIT, "eventdns: %s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper: passed to eventdns.c as a callback so it can generate random
|
|
||||||
* numbers for transaction IDs and 0x20-hack coding. */
|
|
||||||
static void
|
|
||||||
dns_randfn_(char *b, size_t n)
|
|
||||||
{
|
|
||||||
crypto_rand(b,n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Initialize the DNS subsystem; called by the OR process. */
|
/** Initialize the DNS subsystem; called by the OR process. */
|
||||||
int
|
int
|
||||||
dns_init(void)
|
dns_init(void)
|
||||||
{
|
{
|
||||||
init_cache_map();
|
init_cache_map();
|
||||||
evdns_set_random_bytes_fn(dns_randfn_);
|
|
||||||
if (server_mode(get_options())) {
|
if (server_mode(get_options())) {
|
||||||
int r = configure_nameservers(1);
|
int r = configure_nameservers(1);
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
Reference in New Issue
Block a user