mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Merge remote-tracking branch 'origin/maint-0.2.3'
This commit is contained in:
commit
920c76a2fc
2 changed files with 40 additions and 4 deletions
4
changes/bug6866
Normal file
4
changes/bug6866
Normal file
|
@ -0,0 +1,4 @@
|
|||
o Minor bugfixes:
|
||||
- Convert an assert in the pathbias code to a log message. Assert
|
||||
appears to only be triggerable by Tor2Web mode. Fixes bug 6866;
|
||||
bugfix on 0.2.3.17-beta.
|
|
@ -2657,8 +2657,24 @@ pathbias_count_first_hop(origin_circuit_t *circ)
|
|||
}
|
||||
|
||||
/* Completely ignore one hop circuits */
|
||||
if (circ->build_state->onehop_tunnel) {
|
||||
tor_assert(circ->build_state->desired_path_len == 1);
|
||||
if (circ->build_state->onehop_tunnel ||
|
||||
circ->build_state->desired_path_len == 1) {
|
||||
/* Check for inconsistency */
|
||||
if (circ->build_state->desired_path_len != 1 ||
|
||||
!circ->build_state->onehop_tunnel) {
|
||||
if ((rate_msg = rate_limit_log(&first_hop_notice_limit,
|
||||
approx_time()))) {
|
||||
log_info(LD_BUG,
|
||||
"One-hop circuit has length %d. Path state is %s. "
|
||||
"Circuit is a %s currently %s. %s",
|
||||
circ->build_state->desired_path_len,
|
||||
pathbias_state_to_string(circ->path_state),
|
||||
circuit_purpose_to_string(circ->_base.purpose),
|
||||
circuit_state_to_string(circ->_base.state),
|
||||
rate_msg);
|
||||
}
|
||||
tor_fragile_assert();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2759,8 +2775,24 @@ pathbias_count_success(origin_circuit_t *circ)
|
|||
}
|
||||
|
||||
/* Ignore one hop circuits */
|
||||
if (circ->build_state->onehop_tunnel) {
|
||||
tor_assert(circ->build_state->desired_path_len == 1);
|
||||
if (circ->build_state->onehop_tunnel ||
|
||||
circ->build_state->desired_path_len == 1) {
|
||||
/* Check for consistency */
|
||||
if (circ->build_state->desired_path_len != 1 ||
|
||||
!circ->build_state->onehop_tunnel) {
|
||||
if ((rate_msg = rate_limit_log(&success_notice_limit,
|
||||
approx_time()))) {
|
||||
log_info(LD_BUG,
|
||||
"One-hop circuit has length %d. Path state is %s. "
|
||||
"Circuit is a %s currently %s. %s",
|
||||
circ->build_state->desired_path_len,
|
||||
pathbias_state_to_string(circ->path_state),
|
||||
circuit_purpose_to_string(circ->_base.purpose),
|
||||
circuit_state_to_string(circ->_base.state),
|
||||
rate_msg);
|
||||
}
|
||||
tor_fragile_assert();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue