From faf45800611a35be6a4e1381818e69852877f62e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 11 Jun 2018 16:14:57 -0400 Subject: Several attempts to diagnose ticket 25686 There are a few reasons that relays might be uploading desciptors without saying X-Desc-Gen-Reason: 1. They are running an old version of our software, before 0.3.2.stable. 2. They are not running our software, but they are claiming they are. 3. They are uploading through a proxy that strips X-Desc-Gen-Reason. 4. They somehow had a bug in their software. According to the 25686 data, 1 is the most common reason. This ticket is an attempt to diagnose case 4, or prove that case 4 doesn't actually happen. --- src/or/directory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/or/directory.c') diff --git a/src/or/directory.c b/src/or/directory.c index f14bdde90b..47058352f0 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -1810,9 +1810,10 @@ directory_send_command(dir_connection_t *conn, tor_assert(payload); httpcommand = "POST"; url = tor_strdup("/tor/"); - if (why) { - smartlist_add_asprintf(headers, "X-Desc-Gen-Reason: %s\r\n", why); + if (!why) { + why = "for no reason at all"; } + smartlist_add_asprintf(headers, "X-Desc-Gen-Reason: %s\r\n", why); break; } case DIR_PURPOSE_UPLOAD_VOTE: -- cgit v1.2.3-54-g00ecf