浏览代码

when the user asked for a rendezvous port that the hidden service
didn't want to provide, we were sending an IP address back along
with the end cell. fortunately, it was zero. but stop that anyway.


svn:r5022

Roger Dingledine 20 年之前
父节点
当前提交
8b0d37096b
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/or/connection_edge.c

+ 2 - 3
src/or/connection_edge.c

@@ -190,9 +190,8 @@ connection_edge_end(connection_t *conn, char reason, crypt_path_t *cpath_layer)
   }
   }
 
 
   payload[0] = reason;
   payload[0] = reason;
-  if (reason == END_STREAM_REASON_EXITPOLICY) {
-    /* this is safe even for rend circs, because they never fail
-     * because of exitpolicy */
+  if (reason == END_STREAM_REASON_EXITPOLICY &&
+      !connection_edge_is_rendezvous_stream(conn)) {
     set_uint32(payload+1, htonl(conn->addr));
     set_uint32(payload+1, htonl(conn->addr));
     set_uint32(payload+5, htonl(MAX_DNS_ENTRY_AGE)); /* XXXXfill with a real TTL*/
     set_uint32(payload+5, htonl(MAX_DNS_ENTRY_AGE)); /* XXXXfill with a real TTL*/
     payload_len += 8;
     payload_len += 8;