summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-04 13:26:37 -0400
committerNick Mathewson <nickm@torproject.org>2016-11-04 13:26:37 -0400
commitc35c43d7d9df793c890deb14800e24327fbca452 (patch)
tree3f6f3623c301b1900fbf58bb84ec86657baebce0 /src/or/connection_edge.c
parentbd6aa4f3d19a571adeaa956728f7e842d847c4ee (diff)
parentc189cb5cc29e92e55f8e94b5531d2626eff71d63 (diff)
downloadtor-c35c43d7d9df793c890deb14800e24327fbca452.tar.gz
tor-c35c43d7d9df793c890deb14800e24327fbca452.zip
Merge branch 'ticket17238_029_02-resquash'
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 0c18de0089..875c911f01 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -75,6 +75,7 @@
#include "directory.h"
#include "dirserv.h"
#include "hibernate.h"
+#include "hs_common.h"
#include "main.h"
#include "nodelist.h"
#include "policies.h"
@@ -1861,21 +1862,22 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
if (rend_data == NULL) {
return -1;
}
+ const char *onion_address = rend_data_get_address(rend_data);
log_info(LD_REND,"Got a hidden service request for ID '%s'",
- safe_str_client(rend_data->onion_address));
+ safe_str_client(onion_address));
/* Lookup the given onion address. If invalid, stop right now.
* Otherwise, we might have it in the cache or not. */
unsigned int refetch_desc = 0;
rend_cache_entry_t *entry = NULL;
const int rend_cache_lookup_result =
- rend_cache_lookup_entry(rend_data->onion_address, -1, &entry);
+ rend_cache_lookup_entry(onion_address, -1, &entry);
if (rend_cache_lookup_result < 0) {
switch (-rend_cache_lookup_result) {
case EINVAL:
/* We should already have rejected this address! */
log_warn(LD_BUG,"Invalid service name '%s'",
- safe_str_client(rend_data->onion_address));
+ safe_str_client(onion_address));
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
return -1;
case ENOENT:
@@ -1901,7 +1903,7 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
connection_ap_mark_as_non_pending_circuit(conn);
base_conn->state = AP_CONN_STATE_RENDDESC_WAIT;
log_info(LD_REND, "Unknown descriptor %s. Fetching.",
- safe_str_client(rend_data->onion_address));
+ safe_str_client(onion_address));
rend_client_refetch_v2_renddesc(rend_data);
return 0;
}