[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10790: backport candidate: When sending destroy cells from a circui (in tor/trunk: . src/or)



Author: arma
Date: 2007-07-10 23:37:45 -0400 (Tue, 10 Jul 2007)
New Revision: 10790

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/circuitlist.c
Log:
backport candidate:
When sending destroy cells from a circuit's origin, don't include
the reason for tearing down the circuit. The spec says we didn't,
and now we actually don't. Reported by lodger. [Bugfix on 0.1.2.x]


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-07-11 03:28:12 UTC (rev 10789)
+++ tor/trunk/ChangeLog	2007-07-11 03:37:45 UTC (rev 10790)
@@ -70,11 +70,14 @@
   o Minor bugfixes (guard nodes):
     - If there's a never-before-connected-to guard node in our list,
       never choose any guards past it. This way we don't expand our
-      guard list unless we need to. [Bugfix in 0.1.2.x]
+      guard list unless we need to. [Bugfix on 0.1.2.x]
 
   o Security fixes (BSD natd support):
-    - Fix a possible buffer overrun when using BSD natd support.  Bug found
+    - Fix a possible buffer overrun when using BSD natd support. Bug found
       by croup.
+    - When sending destroy cells from a circuit's origin, don't include
+      the reason for tearing down the circuit. The spec says we didn't,
+      and now we actually don't. Reported by lodger. [Bugfix on 0.1.2.x]
 
 
 Changes in version 0.2.0.2-alpha - 2007-06-02

Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c	2007-07-11 03:28:12 UTC (rev 10789)
+++ tor/trunk/src/or/circuitlist.c	2007-07-11 03:37:45 UTC (rev 10790)
@@ -958,9 +958,9 @@
                file, line, circ->purpose);
     }
     reason = END_CIRC_REASON_NONE;
-  } else if (CIRCUIT_IS_ORIGIN(circ) && reason < _END_CIRC_REASON_MIN) {
-    /* We don't send reasons when closing circuits at the origin, but we want
-     * to track them anyway so we can give them to the controller. */
+  }
+  if (CIRCUIT_IS_ORIGIN(circ)) {
+    /* We don't send reasons when closing circuits at the origin. */
     reason = END_CIRC_REASON_NONE;
   }