mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
substantive changes on nick's rendezvous commit.
nick, can you fix these? svn:r4554
This commit is contained in:
@@ -483,7 +483,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l
|
||||
rp_nickname = buf;
|
||||
version = 0;
|
||||
}
|
||||
/* XXX when 0.1.0.x is obsolete, change this to reject version != 2. */
|
||||
/* XXX when 0.1.0.x is obsolete, change this to reject version < 2. */
|
||||
ptr=memchr(rp_nickname,0,nickname_field_len);
|
||||
if (!ptr || ptr == rp_nickname) {
|
||||
log_fn(LOG_WARN, "Couldn't find a null-padded nickname in INTRODUCE2 cell");
|
||||
@@ -593,6 +593,7 @@ rend_service_relaunch_rendezvous(circuit_t *oldcirc)
|
||||
oldcirc->build_state->expiry_time < time(NULL)) {
|
||||
log_fn(LOG_INFO,"Attempt to build circuit to %s for rendezvous has failed too many times or expired; giving up.",
|
||||
oldcirc->build_state->chosen_exit->nickname);
|
||||
/* XXX bug: if the first clause of the if triggers, we'll seg fault. */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -830,6 +831,7 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
|
||||
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
|
||||
CIRCUIT_PURPOSE_S_INTRO))) {
|
||||
tor_assert(circ->cpath);
|
||||
/* XXX this is a bug. ->nickname will always be there. */
|
||||
if (circ->build_state->chosen_exit->nickname &&
|
||||
!strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
|
||||
return circ;
|
||||
@@ -840,6 +842,7 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
|
||||
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
|
||||
CIRCUIT_PURPOSE_S_ESTABLISH_INTRO))) {
|
||||
tor_assert(circ->cpath);
|
||||
/* XXX this is a bug. ->nickname will always be there. */
|
||||
if (circ->build_state->chosen_exit->nickname &&
|
||||
!strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
|
||||
return circ;
|
||||
|
||||
Reference in New Issue
Block a user