]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
make layer_hint check a little stricter.
authorNick Mathewson <nickm@torproject.org>
Mon, 27 Oct 2008 16:57:18 +0000 (16:57 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 27 Oct 2008 16:57:18 +0000 (16:57 +0000)
svn:r17164

src/or/rendcommon.c

index b5f8683f925f0645c645bdc5e1932e208b76c7c9..bcbff326d1be1b1d51e8ef72011feb21290d5fec 100644 (file)
@@ -1396,7 +1396,7 @@ rend_process_relay_cell(circuit_t *circ, const crypt_path_t *layer_hint,
   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);