aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-10-12 20:46:42 -0700
committerNeel Chauhan <neel@neelc.org>2020-10-12 20:46:42 -0700
commit05242f5555ceb276dd945f9d43a37dbe3d5d875b (patch)
tree91b7bd1a45c153f908ff5ca94e7f2240d1f8a950 /src/core/or/connection_edge.c
parentc4812698c3df0bd8aa51c615b0274bbb53b9eb6c (diff)
downloadtor-05242f5555ceb276dd945f9d43a37dbe3d5d875b.tar.gz
tor-05242f5555ceb276dd945f9d43a37dbe3d5d875b.zip
Pass the SOCKS request address in relay begin cells
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r--src/core/or/connection_edge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 25337f0720..f22c49d036 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -1205,6 +1205,7 @@ connection_ap_expire_beginning(void)
}
if (circ->purpose != CIRCUIT_PURPOSE_C_GENERAL &&
+ circ->purpose != CIRCUIT_PURPOSE_CONTROLLER &&
circ->purpose != CIRCUIT_PURPOSE_C_HSDIR_GET &&
circ->purpose != CIRCUIT_PURPOSE_S_HSDIR_POST &&
circ->purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT &&
@@ -3266,7 +3267,8 @@ connection_ap_handshake_send_begin,(entry_connection_t *ap_conn))
edge_conn->begincell_flags = connection_ap_get_begincell_flags(ap_conn);
tor_snprintf(payload,RELAY_PAYLOAD_SIZE, "%s:%d",
- (circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL) ?
+ (circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL ||
+ circ->base_.purpose == CIRCUIT_PURPOSE_CONTROLLER) ?
ap_conn->socks_request->address : "",
ap_conn->socks_request->port);
payload_len = (int)strlen(payload)+1;