Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8113 closed defect (fixed)

Reinstate some fixes from 6e4a4002

Reported by: sysrqb Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index e3a9d59..8935581 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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. "

Child Tickets

Change History (6)

comment:1 Changed 7 years ago by arma

Resolution: duplicate
Status: newclosed

I fixed this and a variety of related typos in git commit 6e4a4002.

comment:2 Changed 7 years ago by sysrqb

Resolution: duplicate
Status: closedreopened

Looks like your fix was...undone in e13e3022. Sorry =/

comment:3 Changed 7 years ago by arma

Gah!

A bunch of my other fixes were also silently reverted then.

comment:4 Changed 7 years ago by sysrqb

Summary: Typo at circuitbuild.c:2360Reinstate some fixes from 6e4a4002

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)
 {

comment:5 Changed 7 years ago by nickm

Resolution: fixed
Status: reopenedclosed

Thanks! Applied as b64dc35b5c27feb4a2df41934d644bc4957921bb

comment:6 Changed 7 years ago by arma

Thanks!

Note: See TracTickets for help on using tickets.