aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2024-02-01 10:34:30 +0100
committerSebastian Hahn <sebastian@torproject.org>2024-02-01 10:34:30 +0100
commit1abc9a3bd3897f6f5cdae5fb3a1dec2e06b4a8d3 (patch)
tree10a847c7ed1e80c12a178c46abca2946158225a6
parentfbca1df9dd7691ada4837ce4deda87315c87e6a2 (diff)
downloadtor-1abc9a3bd3897f6f5cdae5fb3a1dec2e06b4a8d3.tar.gz
tor-1abc9a3bd3897f6f5cdae5fb3a1dec2e06b4a8d3.zip
dirauth: Warn when failing to post during a vote
The only way to figure out that posting a vote or signatures to another dirauth failed is by counting how many success messages there are on notice level, and noticing that it is fewer than the number of configured dirauths. Closes #40910.
-rw-r--r--src/feature/dirclient/dirclient.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c
index 84eefdd90b..9aa3164a65 100644
--- a/src/feature/dirclient/dirclient.c
+++ b/src/feature/dirclient/dirclient.c
@@ -101,7 +101,7 @@ dir_conn_purpose_to_string(int purpose)
case DIR_PURPOSE_UPLOAD_DIR:
return "server descriptor upload";
case DIR_PURPOSE_UPLOAD_VOTE:
- return "server vote upload";
+ return "consensus vote upload";
case DIR_PURPOSE_UPLOAD_SIGNATURES:
return "consensus signature upload";
case DIR_PURPOSE_FETCH_SERVERDESC:
@@ -763,6 +763,11 @@ connection_dir_client_request_failed(dir_connection_t *conn)
"directory server at %s; will retry",
connection_describe_peer(TO_CONN(conn)));
connection_dir_download_routerdesc_failed(conn);
+ } else if (conn->base_.purpose == DIR_PURPOSE_UPLOAD_VOTE ||
+ conn->base_.purpose == DIR_PURPOSE_UPLOAD_SIGNATURES) {
+ log_warn(LD_DIR, "Failed to post %s to %s.",
+ dir_conn_purpose_to_string(conn->base_.purpose),
+ connection_describe_peer(TO_CONN(conn)));
}
}