|
@@ -332,7 +332,7 @@ trusted_dirs_remove_old_certs(void)
|
|
time_t cert_published;
|
|
time_t cert_published;
|
|
if (newest == cert)
|
|
if (newest == cert)
|
|
continue;
|
|
continue;
|
|
- expired = time_definitely_after(now, cert->expires, CERT_EXPIRY_SKEW);
|
|
|
|
|
|
+ expired = now > cert->expires;
|
|
cert_published = cert->cache_info.published_on;
|
|
cert_published = cert->cache_info.published_on;
|
|
/* Store expired certs for 48 hours after a newer arrives;
|
|
/* Store expired certs for 48 hours after a newer arrives;
|
|
*/
|
|
*/
|
|
@@ -524,7 +524,7 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now)
|
|
continue;
|
|
continue;
|
|
cl = get_cert_list(ds->v3_identity_digest);
|
|
cl = get_cert_list(ds->v3_identity_digest);
|
|
SMARTLIST_FOREACH(cl->certs, authority_cert_t *, cert, {
|
|
SMARTLIST_FOREACH(cl->certs, authority_cert_t *, cert, {
|
|
- if (! time_definitely_after(now, cert->expires, CERT_EXPIRY_SKEW)) {
|
|
|
|
|
|
+ if (now < cert->expires) {
|
|
/* It's not expired, and we weren't looking for something to
|
|
/* It's not expired, and we weren't looking for something to
|
|
* verify a consensus with. Call it done. */
|
|
* verify a consensus with. Call it done. */
|
|
download_status_reset(&cl->dl_status);
|
|
download_status_reset(&cl->dl_status);
|
|
@@ -1766,7 +1766,7 @@ smartlist_choose_node_by_bandwidth_weights(smartlist_t *sl,
|
|
sl_last_weighted_bw_of_me = weight*this_bw;
|
|
sl_last_weighted_bw_of_me = weight*this_bw;
|
|
} SMARTLIST_FOREACH_END(node);
|
|
} SMARTLIST_FOREACH_END(node);
|
|
|
|
|
|
- /* XXXX022 this is a kludge to expose these values. */
|
|
|
|
|
|
+ /* XXXX023 this is a kludge to expose these values. */
|
|
sl_last_total_weighted_bw = weighted_bw;
|
|
sl_last_total_weighted_bw = weighted_bw;
|
|
|
|
|
|
log_debug(LD_CIRC, "Choosing node for rule %s based on weights "
|
|
log_debug(LD_CIRC, "Choosing node for rule %s based on weights "
|
|
@@ -1885,7 +1885,7 @@ smartlist_choose_node_by_bandwidth(smartlist_t *sl,
|
|
if (node->rs->has_bandwidth) {
|
|
if (node->rs->has_bandwidth) {
|
|
this_bw = kb_to_bytes(node->rs->bandwidth);
|
|
this_bw = kb_to_bytes(node->rs->bandwidth);
|
|
} else { /* guess */
|
|
} else { /* guess */
|
|
- /* XXX022 once consensuses always list bandwidths, we can take
|
|
|
|
|
|
+ /* XXX023 once consensuses always list bandwidths, we can take
|
|
* this guessing business out. -RD */
|
|
* this guessing business out. -RD */
|
|
is_known = 0;
|
|
is_known = 0;
|
|
flags = node->rs->is_fast ? 1 : 0;
|
|
flags = node->rs->is_fast ? 1 : 0;
|
|
@@ -2004,7 +2004,7 @@ smartlist_choose_node_by_bandwidth(smartlist_t *sl,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /* XXXX022 this is a kludge to expose these values. */
|
|
|
|
|
|
+ /* XXXX023 this is a kludge to expose these values. */
|
|
sl_last_total_weighted_bw = total_bw;
|
|
sl_last_total_weighted_bw = total_bw;
|
|
|
|
|
|
log_debug(LD_CIRC, "Total weighted bw = "U64_FORMAT
|
|
log_debug(LD_CIRC, "Total weighted bw = "U64_FORMAT
|
|
@@ -3420,7 +3420,7 @@ router_add_extrainfo_to_routerlist(extrainfo_t *ei, const char **msg,
|
|
int inserted;
|
|
int inserted;
|
|
(void)from_fetch;
|
|
(void)from_fetch;
|
|
if (msg) *msg = NULL;
|
|
if (msg) *msg = NULL;
|
|
- /*XXXX022 Do something with msg */
|
|
|
|
|
|
+ /*XXXX023 Do something with msg */
|
|
|
|
|
|
inserted = extrainfo_insert(router_get_routerlist(), ei);
|
|
inserted = extrainfo_insert(router_get_routerlist(), ei);
|
|
|
|
|
|
@@ -4671,7 +4671,7 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote,
|
|
|
|
|
|
/** How often should we launch a server/authority request to be sure of getting
|
|
/** How often should we launch a server/authority request to be sure of getting
|
|
* a guess for our IP? */
|
|
* a guess for our IP? */
|
|
-/*XXXX021 this info should come from netinfo cells or something, or we should
|
|
|
|
|
|
+/*XXXX023 this info should come from netinfo cells or something, or we should
|
|
* do this only when we aren't seeing incoming data. see bug 652. */
|
|
* do this only when we aren't seeing incoming data. see bug 652. */
|
|
#define DUMMY_DOWNLOAD_INTERVAL (20*60)
|
|
#define DUMMY_DOWNLOAD_INTERVAL (20*60)
|
|
|
|
|
|
@@ -4690,7 +4690,7 @@ update_router_descriptor_downloads(time_t now)
|
|
update_consensus_router_descriptor_downloads(now, 0,
|
|
update_consensus_router_descriptor_downloads(now, 0,
|
|
networkstatus_get_reasonably_live_consensus(now, FLAV_NS));
|
|
networkstatus_get_reasonably_live_consensus(now, FLAV_NS));
|
|
|
|
|
|
- /* XXXX021 we could be smarter here; see notes on bug 652. */
|
|
|
|
|
|
+ /* XXXX023 we could be smarter here; see notes on bug 652. */
|
|
/* XXXX NM Microdescs: if we're not fetching microdescriptors, we need
|
|
/* XXXX NM Microdescs: if we're not fetching microdescriptors, we need
|
|
* to make something else invoke this. */
|
|
* to make something else invoke this. */
|
|
/* If we're a server that doesn't have a configured address, we rely on
|
|
/* If we're a server that doesn't have a configured address, we rely on
|