]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Tor2Web: tell extend_info_from_node intro point connections are direct
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Fri, 22 Jan 2016 07:05:28 +0000 (18:05 +1100)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Thu, 28 Jan 2016 20:16:32 +0000 (07:16 +1100)
src/or/rendclient.c

index d9cea53c042dd3071391424eafd4063b157724dd..dc05d6f2ed076eb85475b9efd3d622140ef94fe3 100644 (file)
@@ -1366,11 +1366,19 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry,
       smartlist_del(usable_nodes, i);
       goto again;
     }
+#ifdef ENABLE_TOR2WEB_MODE
+    new_extend_info = extend_info_from_node(node, options->Tor2webMode);
+#else
     new_extend_info = extend_info_from_node(node, 0);
+#endif
     if (!new_extend_info) {
+      const char *alternate_reason = "";
+#ifdef ENABLE_TOR2WEB_MODE
+      alternate_reason = ", or we cannot connect directly to it";
+#endif
       log_info(LD_REND, "We don't have a descriptor for the intro-point relay "
-               "'%s'; trying another.",
-               extend_info_describe(intro->extend_info));
+               "'%s'%s; trying another.",
+               extend_info_describe(intro->extend_info), alternate_reason);
       smartlist_del(usable_nodes, i);
       goto again;
     } else {