aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/connection_edge.c6
-rw-r--r--src/or/rendclient.c4
-rw-r--r--src/or/rendmid.c2
-rw-r--r--src/or/rendservice.c1
4 files changed, 7 insertions, 6 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 61d60271fe..36b2341847 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -757,9 +757,6 @@ circuit_get_open_circ_or_launch(connection_t *conn,
return 1; /* we're happy */
}
- log_fn(LOG_INFO,"No safe circuit (purpose %d) ready for edge connection; delaying.",
- desired_circuit_purpose);
-
if(!*conn->rend_query) { /* general purpose circ */
addr = client_dns_lookup_entry(conn->socks_request->address);
if(router_exit_policy_all_routers_reject(addr, conn->socks_request->port)) {
@@ -804,6 +801,9 @@ circuit_get_open_circ_or_launch(connection_t *conn,
strcpy(circ->rend_query, conn->rend_query);
}
}
+ if(!circ)
+ log_fn(LOG_INFO,"No safe circuit (purpose %d) ready for edge connection; delaying.",
+ desired_circuit_purpose);
*circp = circ;
return 0;
}
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index e894cef5f4..fba78fa7ac 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -41,14 +41,14 @@ rend_client_send_establish_rendezvous(circuit_t *circ)
return 0;
}
-#define LEN_REND_INTRODUCE1 204
+#define LEN_REND_INTRODUCE1 (20+20+20+16+128+42)
int
rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
const char *descp;
int desc_len;
char payload[LEN_REND_INTRODUCE1];
- char tmp[LEN_REND_INTRODUCE1-20-16];
+ char tmp[20+20+128];
rend_service_descriptor_t *parsed=NULL;
assert(introcirc->purpose == CIRCUIT_PURPOSE_C_INTRODUCING);
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index c44c994b8a..49a3ffc816 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -124,7 +124,7 @@ rend_mid_introduce(circuit_t *circ, const char *request, int request_len)
goto err;
}
- if (request_len < 276) {
+ if (request_len < 246) {
log_fn(LOG_WARN,
"Impossibly short INTRODUCE1 cell on circuit %d; dropping.",
circ->p_circ_id);
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 181c6728d9..974a71e99e 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -326,6 +326,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, int request_len)
return -1;
}
+ /* XXX NM this is wrong, right? */
/* min key length plus digest length plus nickname length */
if (request_len < 148) {
log_fn(LOG_WARN, "Got a truncated INTRODUCE2 cell on circ %d",