[or-cvs] r9393: Add documentation to dns.c (mainly to test new buildbot vers (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Wed Jan 24 00:20:53 UTC 2007
Author: nickm
Date: 2007-01-23 19:20:49 -0500 (Tue, 23 Jan 2007)
New Revision: 9393
Modified:
tor/trunk/
tor/trunk/src/or/dns.c
Log:
r11283 at catbus: nickm | 2007-01-23 19:20:47 -0500
Add documentation to dns.c (mainly to test new buildbot version)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r11283] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2007-01-23 19:22:52 UTC (rev 9392)
+++ tor/trunk/src/or/dns.c 2007-01-24 00:20:49 UTC (rev 9393)
@@ -935,6 +935,8 @@
set_expiry(resolve, time(NULL) + dns_get_expiry_ttl(ttl));
}
+/** Return true iff <b>address</b> is one of the addresses we use to verify
+ * that well-known sites aren't being hijacked by our DNS servers. */
static INLINE int
is_test_address(const char *address)
{
@@ -1739,12 +1741,19 @@
* nameserver wants to return in response to requests for nonexistent domains.
*/
static smartlist_t *dns_wildcard_list = NULL;
+/** True iff we've logged about a single address getting wildcarded.
+ * Subsequent warnings will be less severe. */
static int dns_wildcard_one_notice_given = 0;
+/** True iff we've warned that our DNS server is wildcarding too many failures.
+ */
static int dns_wildcard_notice_given = 0;
-/** DOCDOC */
+/** List of supposedly good addresses that are getting wildcarded to the
+ * same addresses as nonexistent addresses. */
static smartlist_t *dns_wildcarded_test_address_list = NULL;
+/** True iff we've warned about a test address getting wildcarded */
static int dns_wildcarded_test_address_notice_given = 0;
+/** True iff all addresses seem to be getting wildcarded. */
static int dns_is_completely_invalid = 0;
/** Called when we see <b>id</b> (a dotted quad) in response to a request for
@@ -1779,6 +1788,8 @@
}
}
+/** Note that a single test address (one believed to be good) seems to be
+ * getting redirected to the same IP as failures are. */
static void
add_wildcarded_test_address(const char *address)
{
@@ -1864,6 +1875,8 @@
tor_free(addr);
}
+/** Launch attempts to resolve a bunch of known-good addresses (configured in
+ * ServerDNSTestAddresses). [Callback for a libevent timer] */
static void
launch_test_addresses(int fd, short event, void *args)
{
@@ -1919,7 +1932,8 @@
}
}
-/* DOCDOC */
+/** If appropriate, start testing whether our DNS servers tend to lie to
+ * us. */
void
dns_launch_correctness_checks(void)
{
@@ -1937,12 +1951,14 @@
evtimer_add(&launch_event, &timeout);
}
+/** Return true iff our DNS servers lie to us too much to be trustd. */
int
dns_seems_to_be_broken(void)
{
return dns_is_completely_invalid;
}
+/** Forget what we've previously learned about our DNS servers' correctness. */
void
dns_reset_correctness_checks(void)
{
More information about the tor-commits
mailing list