[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #8113 [Tor]: Reinstate some fixes from 6e4a4002 (was: Typo at circuitbuild.c:2360)
#8113: Reinstate some fixes from 6e4a4002
-----------------------+----------------------------------------------------
Reporter: sysrqb | Owner:
Type: defect | Status: reopened
Priority: minor | Milestone:
Component: Tor | Version:
Resolution: | Keywords:
Parent: | Points:
Actualpoints: |
-----------------------+----------------------------------------------------
Comment(by sysrqb):
I went through 6e4a4002 and I think I found all of the changes that were
undone (which were only a handful). A few were carried over after
refactoring. Hopefully this will save you some time.
{{{
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index e3a9d59..0db3407 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2094,11 +2094,11 @@ pathbias_count_circs_in_states(entry_guard_t
*guard,
path_state_t from,
path_state_t to)
{
- circuit_t *circ = global_circuitlist;
+ circuit_t *circ;
int open_circuits = 0;
- /* Count currently open circuits. Give them the benefit of the doubt */
- for ( ; circ; circ = circ->next) {
+ /* Count currently open circuits. Give them the benefit of the doubt.
*/
+ for (circ = global_circuitlist; circ; circ = circ->next) {
origin_circuit_t *ocirc = NULL;
if (!CIRCUIT_IS_ORIGIN(circ) || /* didn't originate here */
circ->marked_for_close) /* already counted */
@@ -2113,8 +2113,8 @@ pathbias_count_circs_in_states(entry_guard_t *guard,
ocirc->path_state <= to &&
pathbias_should_count(ocirc) &&
fast_memeq(guard->identity,
- ocirc->cpath->extend_info->identity_digest,
- DIGEST_LEN)) {
+ ocirc->cpath->extend_info->identity_digest,
+ DIGEST_LEN)) {
log_debug(LD_CIRC, "Found opened circuit %d in path_state %s",
ocirc->global_identifier,
pathbias_state_to_string(ocirc->path_state));
@@ -2184,7 +2184,7 @@ pathbias_check_use_rate(entry_guard_t *guard)
log_warn(LD_CIRC,
"Your Guard %s=%s is failing to carry an extremely large
"
"amount of stream on its circuits. "
- "To avoid potential route manipluation attacks, Tor has
"
+ "To avoid potential route manipulation attacks, Tor has
"
"disabled use of this guard. "
"Use counts are %ld/%ld. Success counts are %ld/%ld. "
"%ld circuits completed, %ld were unusable, %ld
collapsed, "
@@ -2357,7 +2357,7 @@ pathbias_check_close_rate(entry_guard_t *guard)
"amount of circuits. "
"Most likely this means the Tor network is "
"overloaded, but it could also mean an attack against "
- "you or the potentially the guard itself. "
+ "you or potentially the guard itself. "
"Success counts are %ld/%ld. Use counts are %ld/%ld. "
"%ld circuits completed, %ld were unusable, %ld
collapsed, "
"and %ld timed out. "
@@ -2440,9 +2440,10 @@ pathbias_check_close_rate(entry_guard_t *guard)
}
/** Increment the number of times we successfully extended a circuit to
- * 'guard', first checking if the failure rate is high enough that we
should
- * eliminate the guard. Return -1 if the guard looks no good; return 0
if the
- * guard looks fine. */
+ * <b>guard</b>, first checking if the failure rate is high enough that
+ * we should eliminate the guard. Return -1 if the guard looks no good;
+ * return 0 if the guard looks fine.
+ */
static int
entry_guard_inc_circ_attempt_count(entry_guard_t *guard)
{
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8113#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs