aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dircommon
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-10-24 11:23:31 -0400
committerDavid Goulet <dgoulet@torproject.org>2019-10-24 11:23:31 -0400
commit985717675cf2c613ca88bae694695c5ee7db05d4 (patch)
treea2eabf9b0dd0ad3c02eeca589e84f96320d8c6a7 /src/feature/dircommon
parent09468cc58b52132af1232e2cd3925c273382bba6 (diff)
downloadtor-985717675cf2c613ca88bae694695c5ee7db05d4.tar.gz
tor-985717675cf2c613ca88bae694695c5ee7db05d4.zip
dir: Remove connection_dir_is_anonymous() logging
First, remove the HSDir mention which should not be in that generic function. Second, move them to debug() level since they are possible error case. Part of #31958 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/dircommon')
-rw-r--r--src/feature/dircommon/directory.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/feature/dircommon/directory.c b/src/feature/dircommon/directory.c
index 1ac35dd8b5..8e5b413326 100644
--- a/src/feature/dircommon/directory.c
+++ b/src/feature/dircommon/directory.c
@@ -212,7 +212,8 @@ connection_dir_is_anonymous(const dir_connection_t *dir_conn)
* be closed or marked for close. */
if (linked_conn == NULL || linked_conn->magic != EDGE_CONNECTION_MAGIC ||
conn->linked_conn_is_closed || conn->linked_conn->marked_for_close) {
- log_info(LD_DIR, "Rejected HSDir request: not linked to edge");
+ log_debug(LD_DIR, "Directory connection is not anonymous: "
+ "not linked to edge");
return false;
}
@@ -221,7 +222,8 @@ connection_dir_is_anonymous(const dir_connection_t *dir_conn)
/* Can't be a circuit we initiated and without a circuit, no channel. */
if (circ == NULL || CIRCUIT_IS_ORIGIN(circ)) {
- log_info(LD_DIR, "Rejected HSDir request: not on OR circuit");
+ log_debug(LD_DIR, "Directory connection is not anonymous: "
+ "not on OR circuit");
return false;
}
@@ -230,6 +232,8 @@ connection_dir_is_anonymous(const dir_connection_t *dir_conn)
* not continue so return that it is not anonymous since we can not know for
* sure if it is. */
if (circ->marked_for_close) {
+ log_debug(LD_DIR, "Directory connection is not anonymous: "
+ "circuit marked for close");
return false;
}
@@ -237,7 +241,8 @@ connection_dir_is_anonymous(const dir_connection_t *dir_conn)
* BUG() because if the circuit is not mark for close, we ought to have a
* p_chan else we have a code flow issue. */
if (BUG(CONST_TO_OR_CIRCUIT(circ)->p_chan == NULL)) {
- log_info(LD_DIR, "Rejected HSDir request: no p_chan");
+ log_debug(LD_DIR, "Directory connection is not anonymous: "
+ "no p_chan on circuit");
return false;
}