[or-cvs] r17164: {tor} make layer_hint check a little stricter. (tor/trunk/src/or)

nickm at seul.org nickm at seul.org
Mon Oct 27 16:57:18 UTC 2008


Author: nickm
Date: 2008-10-27 12:57:18 -0400 (Mon, 27 Oct 2008)
New Revision: 17164

Modified:
   tor/trunk/src/or/rendcommon.c
Log:
make layer_hint check a little stricter.

Modified: tor/trunk/src/or/rendcommon.c
===================================================================
--- tor/trunk/src/or/rendcommon.c	2008-10-27 16:47:56 UTC (rev 17163)
+++ tor/trunk/src/or/rendcommon.c	2008-10-27 16:57:18 UTC (rev 17164)
@@ -1396,7 +1396,7 @@
   int r = -2;
   if (CIRCUIT_IS_ORIGIN(circ)) {
     origin_circ = TO_ORIGIN_CIRCUIT(circ);
-    if (layer_hint && layer_hint != origin_circ->cpath->prev) {
+    if (!layer_hint || layer_hint != origin_circ->cpath->prev) {
       log_fn(LOG_PROTOCOL_WARN, LD_APP,
              "Relay cell (rend purpose %d) from wrong hop on origin circ",
              command);



More information about the tor-commits mailing list