aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/conflux_util.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2023-08-24 21:21:05 +0000
committerMike Perry <mikeperry-git@torproject.org>2023-08-25 16:32:59 +0000
commit380727a16de34072b80966ac942278aa146557d6 (patch)
treef744c6324e68f7560cecf21950838d5999dcd5b8 /src/core/or/conflux_util.c
parent97d3cf395066977a5c89fe13093f334ab8b3a0e0 (diff)
downloadtor-380727a16de34072b80966ac942278aa146557d6.tar.gz
tor-380727a16de34072b80966ac942278aa146557d6.zip
Bug #40841: Demote extra legs to protocol warn.
Also add more info to leg dump.
Diffstat (limited to 'src/core/or/conflux_util.c')
-rw-r--r--src/core/or/conflux_util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/or/conflux_util.c b/src/core/or/conflux_util.c
index 589db41e83..7e2e938ca4 100644
--- a/src/core/or/conflux_util.c
+++ b/src/core/or/conflux_util.c
@@ -384,13 +384,13 @@ conflux_validate_legs(const conflux_t *cfx)
/* Ensure we have no pending nonce on the circ */
if (BUG(leg->circ->conflux_pending_nonce != NULL)) {
- conflux_log_set(cfx, is_client);
+ conflux_log_set(LOG_WARN, cfx, is_client);
continue;
}
/* Ensure we have a conflux object */
if (BUG(leg->circ->conflux == NULL)) {
- conflux_log_set(cfx, is_client);
+ conflux_log_set(LOG_WARN, cfx, is_client);
continue;
}
@@ -403,9 +403,10 @@ conflux_validate_legs(const conflux_t *cfx)
// TODO-329-UDP: Eventually we want to allow three legs for the
// exit case, to allow reconnection of legs to hit an RTT target.
// For now, this validation helps find bugs.
- if (BUG(num_legs > conflux_params_get_num_legs_set())) {
- log_warn(LD_BUG, "Number of legs is above maximum of %d allowed: %d\n",
+ if (num_legs > conflux_params_get_num_legs_set()) {
+ log_fn(LOG_PROTOCOL_WARN,
+ LD_BUG, "Number of legs is above maximum of %d allowed: %d\n",
conflux_params_get_num_legs_set(), smartlist_len(cfx->legs));
- conflux_log_set(cfx, is_client);
+ conflux_log_set(LOG_PROTOCOL_WARN, cfx, is_client);
}
}