summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 271e348afd..26cd02d543 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -186,9 +186,10 @@ evdns_log_cb(int warn, const char *msg)
log(severity, LD_EXIT, "eventdns: %s", msg);
}
-/* DOCDOC randfn */
+/** Helper: passed to eventdns.c as a callback so it can generate random
+ * numbers for transaction IDs and 0x20-hack coding. */
static void
-randfn(char *b, size_t n)
+_dns_randfn(char *b, size_t n)
{
crypto_rand(b,n);
}
@@ -198,7 +199,7 @@ int
dns_init(void)
{
init_cache_map();
- evdns_set_random_bytes_fn(randfn);
+ evdns_set_random_bytes_fn(_dns_randfn);
if (get_options()->ServerDNSRandomizeCase)
evdns_set_option("randomize-case", "1", DNS_OPTIONS_ALL);
else