[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Only warn about lack of name binding for self if we have tr...
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv20250/src/or
Modified Files:
routerlist.c
Log Message:
Only warn about lack of name binding for self if we have tried downloading every networkstatus.
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -p -d -r1.457 -r1.458
--- routerlist.c 15 Mar 2006 05:37:27 -0000 1.457
+++ routerlist.c 17 Mar 2006 04:41:57 -0000 1.458
@@ -33,6 +33,7 @@ static void update_networkstatus_cache_d
static void update_networkstatus_client_downloads(time_t now);
static int signed_desc_digest_is_recognized(signed_descriptor_t *desc);
static void routerlist_assert_ok(routerlist_t *rl);
+static int have_tried_downloading_all_statuses(void);
#define MAX_DESCRIPTORS_PER_ROUTER 5
@@ -2815,7 +2816,7 @@ routers_update_all_from_networkstatus(vo
"consider sending your identity fingerprint to the tor-ops.",
n_recent-n_valid, n_recent);
have_warned_about_unverified_status = 1;
- } else if (!n_named && n_naming) { // (n_named <= n_recent/2) {
+ } else if (!n_named && have_tried_downloading_all_statuses()) {
log_warn(LD_GENERAL, "0/%d name-binding directory authorities "
"recognize this server. Please consider sending your "
"identity fingerprint to the tor-ops.",
@@ -3691,6 +3692,26 @@ router_have_minimum_dir_info(void)
return res;
}
+/** Return true iff we have downloaded, or attempted to download, a network
+ * status for each authority. */
+static int
+have_tried_downloading_all_statuses(void)
+{
+ if (!trusted_dir_servers)
+ return 0;
+
+ SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
+ {
+ /* If we don't have the status, and we haven't failed to get the status,
+ * we haven't tried to get the status. */
+ if (!networkstatus_get_by_digest(ds->digest) &&
+ !ds->n_networkstatus_failures)
+ return 0;
+ });
+
+ return 1;
+}
+
/** Reset the descriptor download failure count on all routers, so that we
* can retry any long-failed routers immediately.
*/