summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-11 16:14:57 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-11 16:24:00 -0400
commitfaf45800611a35be6a4e1381818e69852877f62e (patch)
tree4b285d61e9acc4d3305979a472a87484df94766a /src/or/directory.c
parentdd63033fcbb960ac563a8f417a7f65e62781d9a9 (diff)
downloadtor-faf45800611a35be6a4e1381818e69852877f62e.tar.gz
tor-faf45800611a35be6a4e1381818e69852877f62e.zip
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.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c5
1 files changed, 3 insertions, 2 deletions
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: