Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
de7f9111
Unverified
Commit
de7f9111
authored
7 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Update Tor patch to 0.2.9.11.
parent
f6cdbda5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/tor.patch
+21
-18
21 additions, 18 deletions
patches/tor.patch
with
21 additions
and
18 deletions
patches/tor.patch
+
21
−
18
View file @
de7f9111
diff --git a/src/or/control.c b/src/or/control.c
index
220e7e5..a54c8
a2 100644
index
c8c5062..f38b
a2
3
100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1
7
6,6 +1
7
6,8 @@
static int handle_control_hsfetch(control_connection_t *conn, uint32_t len,
@@ -1
9
6,6 +1
9
6,8 @@
static int handle_control_hsfetch(control_connection_t *conn, uint32_t len,
const char *body);
static int handle_control_hspost(control_connection_t *conn, uint32_t len,
const char *body);
...
...
@@ -11,10 +11,10 @@ index 220e7e5..a54c8a2 100644
static int handle_control_add_onion(control_connection_t *conn, uint32_t len,
const char *body);
static int handle_control_del_onion(control_connection_t *conn, uint32_t len,
@@ -
3725,6 +3727
,33 @@
handle_control_hspost(control_connection_t *conn,
@@ -
4246,6 +4248
,33 @@
handle_control_hspost(control_connection_t *conn,
return 0;
}
+/** Called when we get an HSFORGET command: parse the hidden service's onion
+ * address and purge any cached state related to the service. */
+static int
...
...
@@ -45,7 +45,7 @@ index 220e7e5..a54c8a2 100644
/** Called when we get a ADD_ONION command; parse the body, and set up
* the new ephemeral Onion Service. */
static int
@@ -
4396,6 +4425
,9 @@
connection_control_process_inbuf(control_connection_t *conn)
@@ -
5065,6 +5094
,9 @@
connection_control_process_inbuf(control_connection_t *conn)
} else if (!strcasecmp(conn->incoming_cmd, "+HSPOST")) {
if (handle_control_hspost(conn, cmd_data_len, args))
return -1;
...
...
@@ -56,13 +56,13 @@ index 220e7e5..a54c8a2 100644
int ret = handle_control_add_onion(conn, cmd_data_len, args);
memwipe(args, 0, cmd_data_len); /* Scrub the private key. */
diff --git a/src/or/rendcache.c b/src/or/rendcache.c
index
d4bdd68..b9d79b8
100644
index
aa69d73..473a6a4
100644
--- a/src/or/rendcache.c
+++ b/src/or/rendcache.c
@@ -5
35
,6 +5
35
,34 @@
rend_cache_lookup_
entry
(const char *query,
int version,
rend_cache_entry_t **e)
@@ -5
87
,6 +5
87
,34 @@
rend_cache_lookup_
v2_desc_as_service
(const char *query, rend_cache_entry_t **e)
return ret;
}
+/** Remove any cached descriptors for <b>service_id</b>. */
+void
+rend_cache_remove_entry(const char *service_id)
...
...
@@ -95,25 +95,25 @@ index d4bdd68..b9d79b8 100644
* copy the pointer to it to *<b>desc</b>. Return 1 on success, 0 on
* well-formed-but-not-found, and -1 on failure.
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index
0512058..2c8ebfd
100644
index
270b614..69d1b1b
100644
--- a/src/or/rendcache.h
+++ b/src/or/rendcache.h
@@ -
5
6,6 +
5
6,7 @@
void rend_cache_purge(void);
@@ -6
1
,6 +6
1
,7 @@
void rend_cache_purge(void);
void rend_cache_free_all(void);
int rend_cache_lookup_entry(const char *query, int version,
rend_cache_entry_t **entry_out);
+void rend_cache_remove_entry(const char *service_id);
int rend_cache_lookup_v2_desc_as_service(const char *query,
rend_cache_entry_t **entry_out);
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
/** Return value from rend_cache_store_v2_desc_as_{dir,client}. */
typedef enum {
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index a
39e518..909e47
f 100644
index a
93bc94..f311e1
f 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -32,6 +32,9 @@
static extend_info_t *rend_client_get_random_intro_impl(
const rend_cache_entry_t *rend_query,
const int strict, const int warnings);
+static void purge_hid_serv_from_last_hid_serv_requests(
+ const char *onion_address);
+
...
...
@@ -123,7 +123,7 @@ index a39e518..909e47f 100644
@@ -43,6 +46,15 @@
rend_client_purge_state(void)
rend_client_purge_last_hid_serv_requests();
}
+/** Purge all cached state relating to the given hidden service. */
+void
+rend_client_purge_hidden_service(const char *onion_address)
...
...
@@ -137,14 +137,17 @@ index a39e518..909e47f 100644
* send the introduction request. */
void
diff --git a/src/or/rendclient.h b/src/or/rendclient.h
index
124433e..b27d2db
100644
index
b8f8c2f..b1da48c
100644
--- a/src/or/rendclient.h
+++ b/src/or/rendclient.h
@@ -15,6 +15,7 @@
#include "rendcache.h"
void rend_client_purge_state(void);
+void rend_client_purge_hidden_service(const char *onion_address);
void rend_client_introcirc_has_opened(origin_circuit_t *circ);
void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
--
2.9.3
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment