summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-12 21:08:43 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-12 21:08:43 -0500
commitbba995e6660dbb49876886278f71d7d5a85f5f88 (patch)
tree3034169bbd70b8f46d410db2adafa379bcb08627 /src/or
parent715fdfcb7b44ae6fdad886e688708ec0d483a1f8 (diff)
downloadtor-bba995e6660dbb49876886278f71d7d5a85f5f88.tar.gz
tor-bba995e6660dbb49876886278f71d7d5a85f5f88.zip
Begin writing unit tests for rewrite code
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_edge.c1
-rw-r--r--src/or/connection_edge.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 56e496f670..ca99a86ae0 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -924,6 +924,7 @@ connection_ap_handshake_rewrite(entry_connection_t *conn,
out->map_expires = TIME_MAX;
out->end_reason = 0;
out->should_close = 0;
+ out->orig_address[0] = 0;
tor_strlower(socks->address); /* normalize it */
strlcpy(out->orig_address, socks->address, sizeof(out->orig_address));
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index af564cec0c..d4a20e7f96 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -151,7 +151,8 @@ typedef struct {
*/
char orig_address[MAX_SOCKS_ADDR_LEN];
/** True iff the address has been automatically remapped to a local
- * address in VirtualAddrNetwork */
+ * address in VirtualAddrNetwork. (Only set true the first time we
+ * do the mapping.) */
int automap;
/** If this connection has a .exit address, who put it there? */
addressmap_entry_source_t exit_source;