[tor-commits] [tor/master] Revert "Do not replace a HS descriptor with a different replica of itself"
nickm at torproject.org
nickm at torproject.org
Thu Jun 18 15:33:30 UTC 2015
commit 8acf5255c20c667f32313ee672c85f6ae00a4f87
Author: David Goulet <dgoulet at ev0ke.net>
Date: Tue Jun 16 13:16:34 2015 -0400
Revert "Do not replace a HS descriptor with a different replica of itself"
This reverts commit 9407040c592184e05e45a3c1a00739c2dd302288.
Small fix, "e->received" had to be removed since that variable doesn't exist
anymore.
Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
changes/bug16381 | 13 +++++++++++++
src/or/rendcommon.c | 10 ++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/changes/bug16381 b/changes/bug16381
new file mode 100644
index 0000000..51a9b53
--- /dev/null
+++ b/changes/bug16381
@@ -0,0 +1,13 @@
+ o Major bugfix (Hidden service client)
+ - Revert commit 9407040c592184e05e45a3c1a00739c2dd302288 of bug #14219
+ that indeed fixed an issue but introduced a major hidden service
+ reachability regression detailed in bug #16381. This is a temporary
+ fix since we can live with the minor issue in #14219 but the
+ regression introduced is too much of a set back.
+
+ To be clear, #14219 bug just results in some load on the network, and
+ some delay for the client when visiting a hidden service that will
+ ultimately fail.
+
+ This is only a bandaid for #16381 thus it does _not_ fixes it. bugfix
+ on tor-0.2.6.3-alpha~138.
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 5fdd13e..6698f2f 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -1249,12 +1249,18 @@ rend_cache_store_v2_desc_as_client(const char *desc,
/* Do we already have a newer descriptor? */
tor_snprintf(key, sizeof(key), "2%s", service_id);
e = (rend_cache_entry_t*) strmap_get_lc(rend_cache, key);
- if (e && e->parsed->timestamp >= parsed->timestamp) {
- log_info(LD_REND, "We already have a new enough service descriptor for "
+ if (e && e->parsed->timestamp > parsed->timestamp) {
+ log_info(LD_REND, "We already have a newer service descriptor for "
"service ID %s with the same desc ID and version.",
safe_str_client(service_id));
goto okay;
}
+ /* Do we already have this descriptor? */
+ if (e && !strcmp(desc, e->desc)) {
+ log_info(LD_REND,"We already have this service descriptor %s.",
+ safe_str_client(service_id));
+ goto okay;
+ }
if (!e) {
e = tor_malloc_zero(sizeof(rend_cache_entry_t));
strmap_set_lc(rend_cache, key, e);
More information about the tor-commits
mailing list