aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-10-28 17:13:37 -0400
committerNick Mathewson <nickm@torproject.org>2012-11-14 23:16:21 -0500
commitca8843df0adb088b028b5599cd3062ea608f716b (patch)
tree01ec663df0343f0e9a007981faf8fb1b6229a316 /src/or/relay.c
parent7908ab209350782646dfc112d346ea75974b9dec (diff)
downloadtor-ca8843df0adb088b028b5599cd3062ea608f716b.tar.gz
tor-ca8843df0adb088b028b5599cd3062ea608f716b.zip
Refactor client_dns_set_{reverse_,}addressmap() to take a circ
We'd like these functions to be circuit-relative so that we can implement a per-circuit DNS cache and per-circuit DNS cache rules for proposal 205 or its successors. I'm doing this now, as a part of the IPv6 exits code, since there are about to be a few more instances of code using this.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 25fc2e77b3..76e9d2550b 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -725,7 +725,9 @@ connection_ap_process_end_not_open(
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
return 0;
}
- client_dns_set_addressmap(conn->socks_request->address, addr,
+
+ client_dns_set_addressmap(circ,
+ conn->socks_request->address, addr,
conn->chosen_exit_name, ttl);
}
/* check if he *ought* to have allowed it */
@@ -898,7 +900,8 @@ connection_edge_process_relay_cell_not_open(
ttl = (int)ntohl(get_uint32(cell->payload+RELAY_HEADER_SIZE+4));
else
ttl = -1;
- client_dns_set_addressmap(entry_conn->socks_request->address, addr,
+ client_dns_set_addressmap(TO_ORIGIN_CIRCUIT(circ),
+ entry_conn->socks_request->address, addr,
entry_conn->chosen_exit_name, ttl);
remap_event_helper(entry_conn, addr);