Browse Source

put a bandaid in place so servers will have an easier time
believing that they're reachable. this may help resolve the
servers-on-dynamic-ip-addresses problem.


svn:r6561

Roger Dingledine 19 years ago
parent
commit
741b11df45
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/or/connection_or.c

+ 13 - 0
src/or/connection_or.c

@@ -686,6 +686,19 @@ connection_tls_finish_handshake(connection_t *conn)
 #endif
 #endif
     connection_or_init_conn_from_address(conn,conn->addr,conn->port,
     connection_or_init_conn_from_address(conn,conn->addr,conn->port,
                                          digest_rcvd);
                                          digest_rcvd);
+
+    /* Annotate that we received a TLS connection.
+     * (Todo: only actually consider ourselves reachable if there
+     * exists a testing circuit using conn.)
+     *
+     * We already consider ourselves reachable if we can ever process
+     * a create cell -- see onionskin_answer() in circuitbuild.c.
+     *
+     * The reason this bandaid is here is because there's a bug in
+     * Tor 0.1.1.x where middle hops don't always send their create
+     * cell; so some servers rarely find themselves reachable. */
+    if (!is_local_IP(conn->addr))
+      router_orport_found_reachable();
   }
   }
 
 
   if (!server_mode(get_options())) { /* If I'm an OP... */
   if (!server_mode(get_options())) { /* If I'm an OP... */