Updated Tor patch and recompiled Tor with patch applied.

This commit is contained in:
akwizgran
2014-11-24 22:13:16 +00:00
parent 992013e42a
commit 9eee6c1adc
2 changed files with 25 additions and 25 deletions

Binary file not shown.

View File

@@ -1,8 +1,8 @@
diff --git a/src/or/config.c b/src/or/config.c diff --git a/src/or/config.c b/src/or/config.c
index 919dd27..c2d3caf 100644 index 39b85aa..ff42d27 100644
--- a/src/or/config.c --- a/src/or/config.c
+++ b/src/or/config.c +++ b/src/or/config.c
@@ -1039,6 +1039,8 @@ options_act_reversible(const or_options_t *old_options, char **msg) @@ -1096,6 +1096,8 @@ options_act_reversible(const or_options_t *old_options, char **msg)
"non-control network connections. Shutting down all existing " "non-control network connections. Shutting down all existing "
"connections."); "connections.");
connection_mark_all_noncontrol_connections(); connection_mark_all_noncontrol_connections();
@@ -12,10 +12,10 @@ index 919dd27..c2d3caf 100644
} }
diff --git a/src/or/control.c b/src/or/control.c diff --git a/src/or/control.c b/src/or/control.c
index ae9dd69..0ead4c1 100644 index 9378f38..17d2a46 100644
--- a/src/or/control.c --- a/src/or/control.c
+++ b/src/or/control.c +++ b/src/or/control.c
@@ -36,6 +36,8 @@ @@ -37,6 +37,8 @@
#include "nodelist.h" #include "nodelist.h"
#include "policies.h" #include "policies.h"
#include "reasons.h" #include "reasons.h"
@@ -24,7 +24,7 @@ index ae9dd69..0ead4c1 100644
#include "rephist.h" #include "rephist.h"
#include "router.h" #include "router.h"
#include "routerlist.h" #include "routerlist.h"
@@ -197,6 +199,8 @@ static int handle_control_resolve(control_connection_t *conn, uint32_t len, @@ -156,6 +158,8 @@ static int handle_control_resolve(control_connection_t *conn, uint32_t len,
static int handle_control_usefeature(control_connection_t *conn, static int handle_control_usefeature(control_connection_t *conn,
uint32_t len, uint32_t len,
const char *body); const char *body);
@@ -33,7 +33,7 @@ index ae9dd69..0ead4c1 100644
static int write_stream_target_to_buf(entry_connection_t *conn, char *buf, static int write_stream_target_to_buf(entry_connection_t *conn, char *buf,
size_t len); size_t len);
static void orconn_target_get_name(char *buf, size_t len, static void orconn_target_get_name(char *buf, size_t len,
@@ -3181,6 +3185,33 @@ handle_control_usefeature(control_connection_t *conn, @@ -3164,6 +3168,33 @@ handle_control_dropguards(control_connection_t *conn,
return 0; return 0;
} }
@@ -67,9 +67,9 @@ index ae9dd69..0ead4c1 100644
/** Called when <b>conn</b> has no more bytes left on its outbuf. */ /** Called when <b>conn</b> has no more bytes left on its outbuf. */
int int
connection_control_finished_flushing(control_connection_t *conn) connection_control_finished_flushing(control_connection_t *conn)
@@ -3480,6 +3511,9 @@ connection_control_process_inbuf(control_connection_t *conn) @@ -3461,6 +3492,9 @@ connection_control_process_inbuf(control_connection_t *conn)
} else if (!strcasecmp(conn->incoming_cmd, "AUTHCHALLENGE")) { } else if (!strcasecmp(conn->incoming_cmd, "DROPGUARDS")) {
if (handle_control_authchallenge(conn, cmd_data_len, args)) if (handle_control_dropguards(conn, cmd_data_len, args))
return -1; return -1;
+ } else if (!strcasecmp(conn->incoming_cmd, "FORGETHS")) { + } else if (!strcasecmp(conn->incoming_cmd, "FORGETHS")) {
+ if (handle_control_forgeths(conn, cmd_data_len, args)) + if (handle_control_forgeths(conn, cmd_data_len, args))
@@ -78,10 +78,10 @@ index ae9dd69..0ead4c1 100644
connection_printf_to_buf(conn, "510 Unrecognized command \"%s\"\r\n", connection_printf_to_buf(conn, "510 Unrecognized command \"%s\"\r\n",
conn->incoming_cmd); conn->incoming_cmd);
diff --git a/src/or/rendclient.c b/src/or/rendclient.c diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 7abbfd6..e550b65 100644 index 19a8cef..c17439d 100644
--- a/src/or/rendclient.c --- a/src/or/rendclient.c
+++ b/src/or/rendclient.c +++ b/src/or/rendclient.c
@@ -29,6 +29,8 @@ @@ -31,6 +31,8 @@
static extend_info_t *rend_client_get_random_intro_impl( static extend_info_t *rend_client_get_random_intro_impl(
const rend_cache_entry_t *rend_query, const rend_cache_entry_t *rend_query,
const int strict, const int warnings); const int strict, const int warnings);
@@ -90,7 +90,7 @@ index 7abbfd6..e550b65 100644
/** Purge all potentially remotely-detectable state held in the hidden /** Purge all potentially remotely-detectable state held in the hidden
* service client code. Called on SIGNAL NEWNYM. */ * service client code. Called on SIGNAL NEWNYM. */
@@ -40,6 +42,16 @@ rend_client_purge_state(void) @@ -42,6 +44,16 @@ rend_client_purge_state(void)
rend_client_purge_last_hid_serv_requests(); rend_client_purge_last_hid_serv_requests();
} }
@@ -120,10 +120,10 @@ index 1f731d0..7084aef 100644
void rend_client_introcirc_has_opened(origin_circuit_t *circ); void rend_client_introcirc_has_opened(origin_circuit_t *circ);
void rend_client_rendcirc_has_opened(origin_circuit_t *circ); void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index d1b4941..3deb5fc 100644 index a664b5d..70d7283 100644
--- a/src/or/rendcommon.c --- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c +++ b/src/or/rendcommon.c
@@ -954,6 +954,34 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e) @@ -881,6 +881,34 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e)
return 1; return 1;
} }
@@ -155,26 +155,26 @@ index d1b4941..3deb5fc 100644
+ } + }
+} +}
+ +
/** <b>query</b> is a base32'ed service id. If it's malformed, return -1. /** Lookup the v2 service descriptor with base32-encoded <b>desc_id</b> and
* Else look it up. * copy the pointer to it to *<b>desc</b>. Return 1 on success, 0 on
* - If it is found, point *desc to it, and write its length into * well-formed-but-not-found, and -1 on failure.
diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h
index f476593..331784f 100644 index 07a47ac..0a3160d 100644
--- a/src/or/rendcommon.h --- a/src/or/rendcommon.h
+++ b/src/or/rendcommon.h +++ b/src/or/rendcommon.h
@@ -43,6 +43,7 @@ int rend_cache_lookup_desc(const char *query, int version, const char **desc, @@ -39,6 +39,7 @@ void rend_cache_free_all(void);
size_t *desc_len); int rend_valid_service_id(const char *query);
int rend_cache_lookup_entry(const char *query, int version, int rend_cache_lookup_entry(const char *query, int version,
rend_cache_entry_t **entry_out); rend_cache_entry_t **entry_out);
+void rend_cache_remove_entry(const char *service_id); +void rend_cache_remove_entry(const char *service_id);
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc); int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
int rend_cache_store(const char *desc, size_t desc_len, int published, /** Return value from rend_cache_store_v2_desc_as_{dir,client}. */
const char *service_id); typedef enum {
diff --git a/src/or/rendservice.c b/src/or/rendservice.c diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 8a4a11e..35f5e18 100644 index a7c1e32..cc9c0f8 100644
--- a/src/or/rendservice.c --- a/src/or/rendservice.c
+++ b/src/or/rendservice.c +++ b/src/or/rendservice.c
@@ -15,6 +15,7 @@ @@ -16,6 +16,7 @@
#include "circuituse.h" #include "circuituse.h"
#include "config.h" #include "config.h"
#include "directory.h" #include "directory.h"
@@ -182,7 +182,7 @@ index 8a4a11e..35f5e18 100644
#include "networkstatus.h" #include "networkstatus.h"
#include "nodelist.h" #include "nodelist.h"
#include "rendclient.h" #include "rendclient.h"
@@ -3024,6 +3025,9 @@ rend_services_introduce(void) @@ -3033,6 +3034,9 @@ rend_services_introduce(void)
time_t now; time_t now;
const or_options_t *options = get_options(); const or_options_t *options = get_options();