[tor-bugs] #21642 [Core Tor/Tor]: Prop275: Eliminate "published" times from microdescriptor consensus
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed May 10 07:51:32 UTC 2017
#21642: Prop275: Eliminate "published" times from microdescriptor consensus
------------------------------------------------+--------------------------
Reporter: nickm | Owner: nickm
Type: enhancement | Status:
| merge_ready
Priority: Medium | Milestone: Tor:
| 0.3.1.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: TorCoreTeam201703, review-group-17 | Actual Points: .5
Parent ID: | Points: 2
Reviewer: | Sponsor: Sponsor4
------------------------------------------------+--------------------------
Comment (by arma):
Replying to [comment:16 arma]:
> So if we do the next step, which would be setting the timestamp to 2037
or whatever, we will disable this hack. Are we still using the hack much?
It turns out we have a way to check -- when relays publish a new
descriptor, they can include a header:
{{{
case DIR_PURPOSE_UPLOAD_DIR: {
const char *why = router_get_descriptor_gen_reason();
[...]
if (why) {
smartlist_add_asprintf(headers, "X-Desc-Gen-Reason: %s\r\n", why);
}
}}}
So I instrumented moria1 like so:
{{{
diff --git a/src/or/directory.c b/src/or/directory.c
index 67c28e1..4eb461f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -4462,6 +4462,12 @@ directory_handle_command_post,(dir_connection_t
*conn, co
const char *msg = "[None]";
uint8_t purpose = authdir_mode_bridge(options) ?
ROUTER_PURPOSE_BRIDGE : ROUTER_PURPOSE_GENERAL;
+ {
+ char *genreason = http_get_header(headers, "X-Desc-Gen-Reason: ");
+ log_info(LD_DIRSERV,
+ "New descriptor post, because: %s",
+ genreason ? genreason : "not specified");
+ }
was_router_added_t r = dirserv_add_multiple_descriptors(body,
purpose,
conn->base_.address, &msg);
tor_assert(msg);
}}}
Over the course of about 15 minutes, I see:
{{{
$ grep "New descriptor post, because:" moria1-info|cut -d: -f5-|sort|uniq
-c
24 bandwidth has changed
5 config change
10 DirPort found reachable
88 not listed in consensus
9017 not specified
20 ORPort found reachable
9 rotated onion key
79 time for new descriptor
15 version listed in consensus is quite old
}}}
So, initial conclusion is "yes, it's still used".
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21642#comment:22>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list